Local cTAgs:="Homer; Tom; Johnny;"
I convert eit on array
Local aTags := iif(AT(';',cTAGS)!=0, HB_ATokens( cTAGS, ";"), {})
When I open the xbrowse I wish check this customers
How I can make ?
- Code: Select all Expand view
#include "FiveWin.Ch"
#include "ord.ch"
#include "xbrowse.ch"
#include "hbcompat.ch"
//----------------------------------------------------------------------------//
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oDlg, oBrw, oFont
Local cTAgs:="Homer; Tom; Johnny;"
Local aTags := iif(AT(';',cTAGS)!=0, HB_ATokens( cTAGS, ";"), {})
XbrNumFormat( 'A', .t. )
xbrowser aTags
USE CUSTOMER NEW ALIAS "CUST" SHARED VIA "DBFCDX"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 700,400 PIXEL FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE "CUST" ;
COLUMNS "FIRST", "CITY", "AGE", "SALARY" ;
CELL LINES NOBORDER
WITH OBJECT oBrw:InsCol( 1 )
:bEditValue := { || AScan( oBrw:aSelected, oBrw:BookMark ) > 0 }
:SetCheck()
:nHeadBmpNo := { || If( Len( oBrw:aSelected ) == oBrw:nLen, 1, 2 ) }
END
WITH OBJECT oBrw
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lMultiSelect := .f.
:bClrSelFocus := { || { CLR_BLACK, CLR_HGRAY } }
:nStretchCol := 3
:aCols[ 1 ]:bClrSelFocus := { ||{ CLR_BLACK, CLR_WHITE } }
:bLClicked := { |r,c,f,oBrw| If( oBrw:MouseColPos( c ) == 1 , ;
If( ( f := AScan( oBrw:aSelected, oBrw:BookMark ) ) == 0, ;
AAdd( oBrw:aSelected, oBrw:BookMark ), ;
ADel( oBrw:aSelected, f, .t. ) ), nil ), ;
oBrw:RefreshCurrent() }
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
xbrowser oBrw:aSelected
return (0)
//----------------------------------------------------------------------------//
where I can insert checkbox with the records allready selected ?