the button call a method Marcar(nOpt)
nOpt can be 1/2/3 only 1 and 3 activated
at init the xbrowse have this configuration
for nOpt1
- Code: Select all Expand view RUN
METHOD SetupBrowseVertical(nrecnos) CLASS TLOTTO
local nRecords := nRecnos
WITH OBJECT ::oLbx
:nRowHeight := 30
:nClrBorder := CLR_GRAY
:lHscroll := .t.
:l2007 := .F.
:l2015 := .F.
// :nStretchCol := STRETCHCOL_WIDEST
:lAllowRowSizing := .F.
:lAllowColSwapping := .F.
:lAllowColHiding := .F.
:lRecordSelector := .F.
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
FOR i := 2 TO LEN(:aCols)
oCol := :aCols[ i ]
oCol:nWidth := 17
NEXT
FOR i := 1 TO 1
oCol := :aCols[ i ]
oCol:nWidth := 60
oCol:nColDividerStyle := LINESTYLE_BLACK
oCol:bClrStd := {|| { CLR_WHITE, RGB(255,0,0) } }
NEXT
END
Return nil
for nOpt 3
- Code: Select all Expand view RUN
- METHOD SetupBrowseHorizontal() CLASS TLOTTO
WITH OBJECT ::oLbx
:nRowHeight := 30
:nClrBorder := CLR_GRAY
:lHscroll := .t.
:l2007 := .F.
:l2015 := .T.
// :nStretchCol := STRETCHCOL_WIDEST
:lAllowRowSizing := .F.
:lAllowColSwapping := .F.
:lAllowColHiding := .F.
:lRecordSelector := .F.
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
// :SetGroupHeader( "Estrazione", 1, 2)
:SetGroupHeader( "Bari", 3, 7 )
:SetGroupHeader( "Cagliari", 8, 12 )
:SetGroupHeader( "Firenze", 13, 17 )
:SetGroupHeader( "Genova", 18, 22 )
:SetGroupHeader( "Milano", 23, 27 )
:SetGroupHeader( "Napoli", 28, 32 )
:SetGroupHeader( "Palermo", 33, 37 )
:SetGroupHeader( "Roma", 38, 42 )
:SetGroupHeader( "Torino", 43, 47 )
:SetGroupHeader( "Venezia", 48, 52 )
:SetGroupHeader( "Nazionale", 53, 57 )
FOR i := 3 TO LEN(:aCols)
oCol := :aCols[ i ]
oCol:nWidth := 17
NEXT
FOR i := 1 TO 1
oCol := :aCols[ i ]
oCol:nWidth := 60
oCol:nColDividerStyle := LINESTYLE_BLACK
oCol:bClrStd := {|| { CLR_WHITE, RGB(255,0,0) } }
NEXT
END
RETURN NIL
on Source
- Code: Select all Expand view RUN
- DEFINE BUTTON oSelf:oLines FILENAME ".\bitmaps\marca.png" OF ::oBar ;
TOOLTIP "lines" ACTION oSelf:Marcar(aShowCbx[1]:nAt)
I made this method
nPt1 -> must show the Lienstyle step 5 column
- Code: Select all Expand view RUN
- METHOD Marcar(nOpt ) CLASS TLOTTO
local nRecords := val(::nRecnos)
local i,oCol
::lMarcar:=!::lMarcar
IF nOpt=1
//Vert
If ::lMarcar
FOR i := 1 TO (nRecords*5) STEP 5
oCol := ::oLbx:aCols[ i ]
oCol:nColDividerStyle := LINESTYLE_BLACK
NEXT
ELSE
FOR i := 1 TO (nRecords*5) STEP 5
oCol := ::oLbx:aCols[ i ]
oCol:nColDividerStyle := LINESTYLE_LIGHTGRAY
NEXT
Endif
ELSEIf nOpt=2
//venus
ELSEIf nOpt=3
// Horiz
IF ::lMarcar
FOR i := 2 TO 55 STEP 5
oCol := ::oLbx:aCols[ i ]
oCol:nColDividerStyle := LINESTYLE_BLACK
NEXT
ELSE
FOR i := 2 TO 55 STEP 5
oCol := ::oLbx:aCols[ i ]
oCol:nColDividerStyle := LINESTYLE_LIGHTGRAY
NEXT
Endif
Endif
return nil
why not run ?