FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour background / xBrowser ?
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 10:32 AM
Could someone please show me how to change the background of the xBrowser if there are only some scores.
Thanks in advance,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 10:51 AM

Otto,

Do you mean that you want the background image for those records only ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 12:45 PM

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

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
background / xBrowser ?
Posted: Tue Mar 25, 2008 01:44 PM

After defining browse
oBrw:SetColor( CLR_BLACK, CLR_WHITE )

Regards



G. N. Rao.

Hyderabad, India
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 02:22 PM

Mr. NagesWaraRao, thank you.

Now I see:
CLASS TXBrowse FROM TControl

CLASS TControl FROM TWindow

METHOD SelColor( lFore ) INLINE

Regards,
otto

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 03:43 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 04:48 PM

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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 05:04 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
background / xBrowser ?
Posted: Tue Mar 25, 2008 05:09 PM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 05:30 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
background / xBrowser ?
Posted: Tue Mar 25, 2008 06:18 PM

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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
xBrowse - how to change the color of a column
Posted: Mon Aug 25, 2008 10:10 PM

xBrowse
How to change the color of a column
Thanks in advance
Otto

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
background / xBrowser ?
Posted: Tue Aug 26, 2008 12:30 AM

oCol:bclrstd:={||{CLR_BLACK,CLR_WHITE}}

Regards!

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - how to change the color of a column
Posted: Tue Aug 26, 2008 02:14 AM
Otto wrote:xBrowse
How to change the color of a column
Thanks in advance
Otto


oCol:bClrStd := { || { clr1, clr2 } }

you may set other colors also for each column. They can be conditional codeblocks
Please review the DATA of TXBrwColumn in xbrowe.prg
Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Source for xBrowse
Posted: Tue Aug 26, 2008 11:00 AM
Hello Otto,

the new xBrowse-tools 2.0 will write the soure
for all your tested settings.
Just have a look at the toppic for a preview.
On page 3, there are 2 switches possible
1. changing colors Row <> Column
2. changing the color-position / color A <> B



Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion