- Code: Select all Expand view RUN
oCol := ::oCol( "cHeader" )
::getWidth( replicate( "B", len( eval( oCol:bStrData ) ) ), oCol:oDataFont )
With this, the fivewin returns an error like this: Class 'Nil' no exported method BSTRDATA
oCol := ::oCol( "cHeader" )
::getWidth( replicate( "B", len( eval( oCol:bStrData ) ) ), oCol:oDataFont )
JC wrote:Nages,
Thanks for your tip... I will try to use ::adjust() after reallocate the headers and values of columns!
Ok
But I wonder why do you need to do it at all? Xbrowse does exactly the same calculations you are trying to do. May I know your purpose, if you dont mind ? I am just curious
oBrw := TXBrowse():new( oDlg )
oBrw:SetArray( aDataArray, .T., 2 )
oBrw:aCols[1]:cHeader := ""
oBrw:aCols[1]:nWidth := 30
oBrw:aCols[1]:setCheck( { "IMG_CHECK_ON", "IMG_CHECK_OFF" } )
oBrw:aCols[1]:cSortOrder := NIL
oBrw:aCols[2]:cHeader := "Code"
oBrw:aCols[2]:nWidth := 50
oBrw:aCols[2]:nDataStrAlign := AL_CENTER
oBrw:aCols[3]:cHeader := "Name"
oBrw:aCols[3]:nWidth := 330
oBrw:aCols[3]:nDataStrAlign := AL_LEFT
Application
===========
Path and name: C:\app.EXE (32 bits)
Size: 1,430,528 bytes
Time from start: 0 hours 1 mins 7 secs
Error occurred at: 11/09/2008, 08:42:23
Error description: Error BASE/1004 Class: 'NIL' has no exported method: NESCAPEMENT
Args:
[ 1] = U
Stack Calls
===========
Called from: => NESCAPEMENT(0)
Called from: C:\FWH\source\classes\xbrowse.prg => FONTESC(8124)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBRWCOLUMN:HEADERWIDTH(6339)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBRWCOLUMN:ADJUST(6191)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:ADJUST(748)
ukoenig wrote:Hello JC
oBrw:aCols[1]:cSortOrder := NIL
I think :
< cSortOrder > has to be the header-string of a col.
Regards
Uwe
ukoenig wrote:Hello JC
oBrw:aCols[1]:cSortOrder := NIL
I think :
< cSortOrder > has to be the header-string of a col.
Regards
Uwe
cHeader := "anything_for_header" <- Only for exhibition because this is generated automatically!!
oCol := ::oCol( cHeader )
nLenHeader := ::getWidth( replicate( "B", len( cHeader ) ) )
nLenData := ::getWidth( replicate( "B", len( ::aArrayData[1, oCol:nArrayCol] ) ), oCol:oDataFont )
oCol:nWidth := max( nLenHeader, nLenData )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 40 guests