Thanks in advance,
Otto


Otto,
Do you mean that you want the background image for those records only ?
Antonio, thank you for your answer. I changed the screen shot to show what I mean.
I mean I would like to have white instead of blue.
There is only one record in the xBrowser.
Regards,
otto
After defining browse
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
Mr. NagesWaraRao, thank you.
Now I see:
CLASS TXBrowse FROM TControl
CLASS TControl FROM TWindow
METHOD SelColor( lFore ) INLINE
Regards,
otto
Otto,
I don't see a selColor() method in TControl.
If you look at TXBrowse():new() you will see:
::SetColor( CLR_BLACK, GetSysColor( COLOR_WINDOW ) )
Thus, the standard window color is being used by default (which is often white). You should be able to change this using:
oBrw:setColor( nClrFore, nClrBack )
setColor() is inherited from TWindow.
James
James, it is a typo.
It should be
METHOD SetColor( nClrFore, nClrBack, oBrush )
Isn’t it like that: xBrowser inherits from control class and Control from window class?
Regards,
Otto
Otto,
>James, it is a typo.
>It should be
>METHOD SetColor( nClrFore, nClrBack, oBrush )
Correct.
>Isn’t it like that: xBrowser inherits from control class and Control from window class?
Yes. It is a method of the TWindow class.
Did you try setting the color using this method? If it doesn't work, then perhaps it is a bug in the TXBrowse class.
James
Mr James
There is no bug in the xbrowse class. The class just inherits the colors from its parents.
If the main window's nClrPane is set to blue, xbrowse also inherits the same nClrPane. Mr Otto must have set main windows colors as <somecolr>, CLR_BLUE. Naturally xbrowse inhertited blue color as nClrPane.
If we want white background for xbrowse, ( different than its parent ) we should set it for xbrowse.
This can be done by oBrw:SetColor () or while creating @ r,c XBROWSE ...... COLORS CLR_BLACK,CLR_WHITE.
NageswaraRao,
>There is no bug in the xbrowse class. The class just inherits the colors from its parents.
I believe I said it inherts from its parents. I did not test the xBrowse to see if the background was working properly when there are no records being displayed.
>This can be done by oBrw:SetColor ()
I think that is what I said also. Perhaps I wasn't clear.
James
Thank you where much for your help.
It is working as suspected. It was my mistake.
Now I have this code:
ACTIVATE DIALOG oDlg ;
ON INIT oBrw:SetColor( CLR_BLACK, CLR_WHITE )
Regards,
Otto
xBrowse
How to change the color of a column
Thanks in advance
Otto
oCol:bclrstd:={||{CLR_BLACK,CLR_WHITE}}
Regards!
Shuming Wang
Otto wrote:xBrowse
How to change the color of a column
Thanks in advance
Otto
