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.
G. N. Rao.
Hyderabad, India
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
Rao,
The code I am running is exactly what I posted. The window background is white.
The only way I can get lines is to use the LINES clause in the browse definition.
If I try to turn on lines by setting the colors using:
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
There are still no lines.
I am running Windows 10. What version of Windows are you using?
James
I am running Windows 10.
1) Are you able to see lines with LINESTYLE_DARKGRAY ?
2) Can you please test my exact program and post the screen-shot?
3) Also please check the result of GetSysColor( COLOR_WINDOW ) and let us know the result.
oBrw:CreateFromCode()
oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY
oBrw:CreateFromCode()I did not observe it either. Yes others and me included did not test your exact code nor examined it closely or one of us would have found the mistake.
Yes, very important point to note is that oBrw:CreateFromCode() should be the last statement after specifying all settings.
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_HIGHLROWJames Bott wrote:Ok, now for some more confusion. Some settings are OK after the oBrw:CreateFromCode() call. These ones seem to work:
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.