I need to set autosort feature later.
I do oBrowse:lAutoSort := .T., but in xbrowse.prg it says as a comment:
// used internally. do not use in applications
Is it safe to use?.
Thank you.
// used internally. do not use in applications
Is it safe to use?.
if ::cSortOrder != nil
if ::oBrw:lAutoSort .and. ::cSortOrder != nil
albeiroval wrote:Mr Rao,
You will have a small example of how to use the codeblock: bSeek?
well with in DBFCDX used,
: bSeek = {| c | (oBrw: cAlias) -> (DBSEEK (Upper (c). t.))}
Thank you,
Regards,
@ <row>,<col> SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE <width>, <height> PIXEL OF <oDlg/oWnd> COLOR <your colors>
METHOD DataBrowse() CLASS TMyApp
local oDlg
local oFont
local oBar
local lExit := FALSE
local oServer:= ::oSrv:oServer
local oSelf:= Self
::oQry = oServer:Query( "SELECT * FROM " + ::oSrv:cNomina + " ORDER BY cedula ASC" )
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12 BOLD
DEFINE DIALOG oDlg RESOURCE "xBrowse" OF oDlg FONT oFont
REDEFINE XBROWSE ::oBrw ID 100 OF oDlg;
FIELDS ::oQry:cedula, ::oQry:nombre, ::oQry:activo;
HEADER "Cedula", "Nombre", "Activo" ;
SIZES 100, 350, 100;
LINES CELL AUTOSORT
WITH OBJECT ::oBrw:Activo
:bStrData = {|| if(::oQry:RecCount()>0, if(::oQry:Activo, "Activo", "Inactivo"), ::oQry:activo)}
END
WITH OBJECT ::oBrw
:lIncrFilter := .t.
// :lSeekWild := .t.
:nMarqueeStyle:= MARQSTYLE_HIGHLROW
:bClrStd := {|| If(::oBrw:KeyNo() % 2 == 0,{CLR_BLACK, RGB( 224, 236, 255 )}, {CLR_BLACK, RGB( 189, 211, 253 )} ) }
// :bSeek := {|c| DoSeek(c, ::oQry, ::oBrw)} <==== with this works
END
REDEFINE SAY ID 101 OF oDlg
REDEFINE SAY ::oBrw:oSeek PROMPT ::oBrw:cSeek COLOR CLR_BLACK, nRGB( 117, 236, 45 ) ID 102 OF oDlg
::oBrw:SetDolphin( ::oQry )
oDlg:oClient = ::oBrw
ACTIVATE DIALOG oDlg;
CENTERED;
ON INIT ( oSelf:CreaButonBar( oBar, oDlg, @lExit ) )
::oQry:End()
::oBrw = Nil
Return Nil
//---------------------------------------------------------//
static function DoSeek( c, oQry, oBrw )
oQry:Seek( c, "cedula",,, .T. )
oBrw:cSeek:= ""
Return .T.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: jmartial and 76 guests