// as a sample :
// a Color-Selection-browser
// The Array
PRIVATE aBRCOLOR2[12][2]
aBRCOLOR2[1] := { "1", "Black" }
aBRCOLOR2[2] := { "2", "White" }
aBRCOLOR2[3] := { "3", "Blue" }
aBRCOLOR2[4] := { "4", "Green" }
aBRCOLOR2[5] := { "5", "Red" }
aBRCOLOR2[6] := { "6", "Yellow" }
aBRCOLOR2[7] := { "7", "Magenta" }
aBRCOLOR2[8] := { "8", "SELECT" }
aBRCOLOR2[9] := { " 9", "Borland" }
aBRCOLOR2[10] := { "10", "Tiled" }
aBRCOLOR2[11] := { "11", "Bricks" }
aBRCOLOR2[12] := { "12", "Brush" }
oLbx2 := TXBrowse():New( oFld:aDialogs[1] )
oLbx2:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx2:nColDividerStyle := LINESTYLE_BLACK
oLbx2:nRowDividerStyle := LINESTYLE_BLACK
oLbx2:bClrSel := {|| {RGB(173,183,4), RGB(250,247,107) }}
oLbx2:SetArray( aBRCOLOR2 )
// 2 Cols
// -------
oLbx2:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx2:aCols[ 2 ]:cHeader = Padr("End", 19)
oLbx2:lHScroll := .F.
oLbx2:lVScroll := .F.
oLbx2:lFooter := .F.
// What to do, when row blclicked
// -------------------------------------
oLbx2:bLClicked := { | nRow, nCol | Bs_END := oLbx2:nRowSel, ;
IIF( Bs_END < 9, ;
( Bs_COLOR2 := B_COLORE(Bs_END), oB_COLOR2:Refresh() ), NIL ) }
oLbx2:aCols[ 2 ]:AddResource("Black")
oLbx2:aCols[ 2 ]:AddResource("White")
oLbx2:aCols[ 2 ]:AddResource("Blue")
oLbx2:aCols[ 2 ]:AddResource("Green")
oLbx2:aCols[ 2 ]:AddResource("Red")
oLbx2:aCols[ 2 ]:AddResource("Yellow")
oLbx2:aCols[ 2 ]:AddResource("Magenta")
oLbx2:aCols[ 2 ]:AddResource("Farbwahl")
oLbx2:aCols[ 2 ]:AddResource("Borland")
oLbx2:aCols[ 2 ]:AddResource("Tiled")
oLbx2:aCols[ 2 ]:AddResource("Bricks")
oLbx2:aCols[ 2 ]:AddResource("Color")
oLbx2:aCols[ 2 ]:bBmpData := {|| oLbx2:nArrayAt }
oLbx2:aCols[ 2 ]:bStrData := {|| oLbx2:aRow[2] }
oLbx2:CreateFromResource( 220 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 108 guests