background / xBrowser ?

background / xBrowser ?

Postby Otto » 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

Image
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » 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
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby nageswaragunupudi » Tue Mar 25, 2008 1:44 pm

After defining browse
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Otto » Tue Mar 25, 2008 2:22 pm

Mr. NagesWaraRao, thank you.

Now I see:
CLASS TXBrowse FROM TControl

CLASS TControl FROM TWindow

METHOD SelColor( lFore ) INLINE

Regards,
otto
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby James Bott » Tue Mar 25, 2008 3: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Otto » Tue Mar 25, 2008 4: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
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby James Bott » Tue Mar 25, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby nageswaragunupudi » Tue Mar 25, 2008 5: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
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Tue Mar 25, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Otto » Tue Mar 25, 2008 6: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
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

xBrowse - how to change the color of a column

Postby Otto » Mon Aug 25, 2008 10:10 pm

xBrowse
How to change the color of a column
Thanks in advance
Otto
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby ShumingWang » Tue Aug 26, 2008 12:30 am

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

Regards!

Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: xBrowse - how to change the color of a column

Postby nageswaragunupudi » Tue Aug 26, 2008 2: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
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Source for xBrowse

Postby ukoenig » 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

Image

Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests