I have no problems here.
By default XBrowse does not display any lines. We need to use nColDividerStyle and nRowDividerStyle to turn on lines.
I have no problem with colors of lines either.
func dbtest()
local oBrw, oWnd
USE CUSTOMER
DEFINE WINDOW oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:SetRDD( .t. )
WITH OBJECT oBrw
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:CreateFromCode()
END
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd CENTERED
return nil
oBrw:CreateFromCode()
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:CreateFromCode()
very important point to note is that oBrw:CreateFromCode() should be the last statement after specifying all settings.
DEFINE XBROWSE oBrw
...
ACTIVATE BROWSE oBrw
oBrw:CreateFromCode()
oBrw:setFont( oFont )
oBrw:nRowHeight := 25
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
James Bott wrote:Ok, now for some more confusion. Some settings are OK after the oBrw:CreateFromCode() call. These ones seem to work:
- Code: Select all Expand view
oBrw:CreateFromCode()
oBrw:setFont( oFont )
oBrw:nRowHeight := 25
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
This is why I didn't think it mattered. Still it is good policy to put the oBrw:CreateFromCode() call last.
James
CreateFromCode() calls method Adjust(). Adjust() method calculates column widths and row heights on the basis of the old font which are not suited to the font you assigned later.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 33 guests