Page 2 of 3

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Mon May 02, 2016 12:56 am
by nageswaragunupudi
Thanks for the feedback. So, we shall provide a buttonbar as part of xbrowse. We also keep in mind the suggestion of Mr Robb to provide the facility to display some buttons on the right.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Mon May 02, 2016 4:25 pm
by joseluisysturiz
Español:
Saludos, que bueno saber que es viable y beneficioso lo de la barra de botones en el xbrowse...añadiendo algo seria que los GETs de la barra del header tubiese el boton accion de los GET normales, creo los botones que sugiere el colega Robb se podrian colocar en la misma barra de botones que sugiero para que no descuadre los GETs y tamaño de las columnas, igual hay que ver el diseño como se veria e xbrowse con los cambios sugeridos. Gracias. saludos... :shock:

English(google traslator):
Greetings, good to know that it is feasible and beneficial as the button bar at the xbrowse ... adding something serious that GETs Bar header tubiese the action of normal GET button, I think the buttons colleague suggests Robb could be placed on the same button bar I suggest not to mismatch the GETs and size of the columns, you still need to see the design as Veria and xbrowse with the suggested changes. Thank you. regards... :shock:

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Wed May 04, 2016 2:45 am
by ShumingWang
1. 2 lines gets as optional, some filters like "a" --> "c", 100--1000
2. :bBarGetAction
Regards!
Shuming Wang

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Thu Jun 09, 2016 10:55 am
by MGA
Mr. Rao ,

this will work with tdolphin object in xbrowse?

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Thu Jun 09, 2016 2:02 pm
by nageswaragunupudi
ShumingWang wrote:1. 2 lines gets as optional, some filters like "a" --> "c", 100--1000
2. :bBarGetAction
Regards!
Shuming Wang

We will try to provide soon.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Thu Jun 09, 2016 2:03 pm
by nageswaragunupudi
SGS wrote:Mr. Rao ,

this will work with tdolphin object in xbrowse?

The BarGets feature works with any browse.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Thu Jun 23, 2016 4:45 pm
by Marc Vanzegbroeck
Hi,

Is it possible to execute a function, after entering a search-text in the get fields? Maybe a valid.
Than a filter-action can be executed automaticy, without pressing the 'Set filter'-button.

Thanks,

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Thu Jun 23, 2016 11:06 pm
by nageswaragunupudi
You can use oCol:bBarGetValid to be executed as Valid function for the Get.

But there is an issue. The Valid is executed only when the Get loses focus. At the moment, pressing enter or Tab is not exiting the Get and the only way is for the user to change the focus by clicking elsewhere. We are working on this limitation.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Mon Jul 25, 2016 12:00 am
by rhlawek
When using TArrayData() as the datasource for an xbrowse instance, how does one set a filter?

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Mon Jul 25, 2016 12:34 am
by nageswaragunupudi
The idea is nice.
As of now that is not possible.
We shall consider how such extensions can be made possible.
Thanks for the suggestion.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Fri Aug 12, 2016 9:46 am
by Silvio.Falconi
Nages,
Is it possible to insert the gets (to search data) into header of each column . the final user can click with the mouse on header and it open in automatic the get
I saw it into QuantumGrid component
Image

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Mon Sep 05, 2016 9:08 am
by ShumingWang
Another simple way to add the getbar feature:

1. txbrowse class
+ data lgetbar

txbrwcolumn class
+ data cf1 // firstline
+ data cf2 //second line
+ data cfieldname // for sql where / search

2. method headerheight() class txbrowse
headerheight + 2*::nRowheight // to place the 2 gets bar lines

3. METHOD MouseRowPos( nRow ) CLASS TXBrowse
if ::lgetbar.and.nrow<::HeaderHeight().and.nrow>=::HeaderHeight()-::nrowheight
nrowpos:=-1
elseif ::lgetbar.and.nrow<=::HeaderHeight()-::nrowheight.and.nrow>=::HeaderHeight()-::nrowheight*2
nrowpos:=-2
else

nRowPos := Int( nTmp / ::nRowHeight ) + 1
end

4. method paint() class txbrowse

if ::lgetbar
for nFor := 1 to nLast
if aCols[ nFor ] > nBrwWidth
exit
endif
oCol := ::ColAtPos( nFor )
oCol:PaintData( nRow-::nrowheight*2, aCols[ nFor ], nHeight, lHighLite, .t., nFor, -1 )

oCol:PaintData( nRow-::nrowheight, aCols[ nFor ], nHeight, lHighLite, .t., nFor, 0 )

next
//the right+1 column
oCol:PaintData( nRow-::nrowheight*2, aCols[ nLast+1 ], nHeight, lHighLite, .t., nFor, -1 )
oCol:PaintData( nRow-::nrowheight, aCols[ nLast+1], nHeight, lHighLite, .t., nFor, 0 )
endif

5.
method paintdata() class txbrwcolumn

if ::bStrData != nil.and. !EVAL(::obrw:bBookMark)==EVAL(::obrw:bkeyCount)+1,.t.);
.or.::obrw:lgetbar.and.nPaintRow<=0

if ::obrw:lgetbar.and.nPaintRow==-1

cdata:=::cf1
elseif ::obrw:lgetbar.and.nPaintRow==0
cdata:=::cf2
else
cData := Eval( ::bStrData )
end

6. method edit() class txbrwcolumn

if ::obrw:nrowsel==-1
uvalue:=::cf1
elseif ::obrw:nrowsel==0
uvalue:=::cf2
else
uValue := IfNil( ::Value, ::BlankValue() )
end

if ::obrw:lgetbar

if ::obrw:nrowsel==-1

::bOnPostEdit:={|o,v,n| if(n != VK_ESCAPE ,::cf1:=v,)}
::nEdittype:={||if(::beditblock<>nil,EDIT_GET_BUTTON,1)}
if ::beditblock<>nil.and.GetCursorPos()[2]>::nwidth+ ::nDisplayCol-10
::RunBtnAction()
end
elseif ::obrw:nrowsel==0
::bOnPostEdit:={|o,v,n| if(n != VK_ESCAPE ,::cf2:=v,)}
::nEdittype:={||if(::beditblock<>nil,EDIT_GET_BUTTON,1)}
if ::beditblock<>nil.and.GetCursorPos()[2]>::nwidth+ ::nDisplayCol-10
::RunBtnAction()
end

else
::bOnPostEdit:=if(::bOnPostEditST == nil,{|o,v,n|v:=v},::bOnPostEditST)
::nEdittype:=::nEdittypeSt
endif
end
Image
The problem left is nedittype , can't enable bar gets always enable if nedittype<1


Shuming Wang

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Tue Sep 06, 2016 5:34 am
by nageswaragunupudi
rhlawek wrote:When using TArrayData() as the datasource for an xbrowse instance, how does one set a filter?

You can use the same syntax like DBF.

Ex: oBrw:oDbf:SetFilter( "AGE > 40" )

Please let us know if you face any problems.

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Sat Jul 21, 2018 2:29 am
by fraxzi
Mr. Rao,

:lSeekBar works with MariaDB RS, but :lGetBar does not show ...

Not supported??

:?:

Re: XBrowse 16.04 : Gets in Header Bar

PostPosted: Sat Jul 21, 2018 2:36 am
by nageswaragunupudi
lGetBar works for all datasources. It is independent of the datasource.