Hello,
I did some tests with the new xbrowse-options
The cell-formating is working fine now.
Something else i noticed :
At first, i didn't see any color squares.
I had to draw a black frame around the color-box.
After that, it was ok.
PRIVATE aCOLTWAHL[9][2]
aCOLTWAHL[1] := { "1", "White" }
aCOLTWAHL[2] := { "2", "Black" }
aCOLTWAHL[3] := { "3", "Blue" }
aCOLTWAHL[4] := { "4", "Green" }
aCOLTWAHL[5] := { "5", "Red" }
aCOLTWAHL[6] := { "6", "Yellow" }
aCOLTWAHL[7] := { "7", "Magenta" }
aCOLTWAHL[8] := { "8", "Cyan" }
aCOLTWAHL[9] := { "9", "SELECT" }
// Text-Color
s_COLTWAHL := e_COLTWAHL // Default value
oBrw2 := TXBrowse():New( oDlg5 )
oBrw2:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw2:nColDividerStyle := LINESTYLE_BLACK
oBrw2:nRowDividerStyle := LINESTYLE_BLACK
oBrw2:SetArray( aCOLTWAHL )
oBrw2:aCols[ 1 ]:cHeader = Padr("No.", 3)
oBrw2:aCols[ 2 ]:cHeader = Padr("Select", 16)
oBrw2:lHScroll := .F.
oBrw2:lVScroll := .F.
oBrw2:aCols[ 1 ]:bClrStd := {|| {CLR_BLACK, ;
IIF( oBrw2:nArrayAt = s_COLTWAHL, CLR_YELLOW, CLR_WHITE ) } }
oBrw2:bLClicked := { | nRow, nCol | e_COLTWAHL := oBrw2:nRowSel }
oBrw2:aCols[ 2 ]:AddResource("White")
oBrw2:aCols[ 2 ]:AddResource("Black")
oBrw2:aCols[ 2 ]:AddResource("Blue")
oBrw2:aCols[ 2 ]:AddResource("Green")
oBrw2:aCols[ 2 ]:AddResource("Red")
oBrw2:aCols[ 2 ]:AddResource("Yellow")
oBrw2:aCols[ 2 ]:AddResource("Magenta")
oBrw2:aCols[ 2 ]:AddResource("Cyan")
// This is new !!!
// METHOD aRow INLINE ( ::aArrayData[ ::nArrayAt ] ) // to make the coding easy
oBrw2:aCols[ 2 ]:bBmpData := {|| oBrw2:nArrayAt }
oBrw2:aCols[ 2 ]:bStrData := {|| aCOLTWAHL[oBrw2:nArrayAt][2] }
oBrw2:CreateFromResource( 600 )
I wanted to change nArrayAt with aRow.
I got a Error.
( oBrw2:nArrayAt works perfect )
for me it doesn't matter, to carry on, using oBrw:nArrayAt
ERROR !!! If using => oBrw2:aRow
Application
==========
Path and name : D:\_VDESIGN\Designer.exe (32 bits)
Größe : 1,951,232 bytes
Time from start : 0 hours 0 mins 0 secs
Error occurred at : 16.03.08, 21:44:57
Error description : Error BASE/1068 Argument error: array access
Args:
[ 1] = A { ... }
[ 2] = A { ... }
Stack Calls
===========
Called from : designer.PRG => (b)INIT_BAR(606)
Called from : XBROWSE.PRG => TXBRWCOLUMN:DATAWIDTH(0)
Called from : XBROWSE.PRG => TXBRWCOLUMN:ADJUST(0)
Called from : XBROWSE.PRG => TXBROWSE:ADJUST(0)
Called from : XBROWSE.PRG => TXBROWSE:INITIATE(0)
Called from : => __OBJSENDMSG(0)
Called from : HARBOUR.PRG => OSEND(0)
Called from : HARBOUR.PRG => ASEND(0)
Called from : DIALOG.PRG => TDIALOG:INITIATE(0)
Called from : DIALOG.PRG => TDIALOG:HANDLEEVENT(0)
Called from : => DIALOGBOX(0)
Called from : DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from : designer.PRG => INIT_BAR(922)
Called from : designer.PRG => (b)MAIN(358)
Called from : WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from : designer.PRG => MAIN(358)
Regards
Uwe
[/img]