FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to assign a color to TGroup
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How to assign a color to TGroup
Posted: Wed Dec 23, 2009 08:51 AM
As subject. I need to assign a color to the line of the group (not to the inside). The following sample doesn't work:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 1 TO 4, 20;
           COLOR CLR_HRED

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 09:26 AM

Enrico,

Have you tried this syntax?

@ <nTop>, <nLeft> [ GROUP <oGroup> ] TO <nBottom>, <nRight> ;
[ <label:LABEL,PROMPT> <cLabel> ] ;
[ OF <oWnd> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 10:17 AM

Colors are not working for Groups in a Themed application.
For non-themed application, forecolor is used to paint the prompt, if any, and back color is used to fill the entire group area including the border.
Color has no effect on the color of the border in both cases.

Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 01:27 PM
James Bott wrote:Enrico,

Have you tried this syntax?

@ <nTop>, <nLeft> [ GROUP <oGroup> ] TO <nBottom>, <nRight> ;
[ <label:LABEL,PROMPT> <cLabel> ] ;
[ OF <oWnd> ] ;
[ COLOR <nClrFore> [,<nClrBack>] ] ;


Regards,
James


Yes, but it doesn't work.

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 01:29 PM
nageswaragunupudi wrote:Colors are not working for Groups in a Themed application.
For non-themed application, forecolor is used to paint the prompt, if any, and back color is used to fill the entire group area including the border.
Color has no effect on the color of the border in both cases.


:-)

Ok, let's see it from the other side: what is the right control to get a colored square perimeter?

EMG
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 04:13 PM
Hello Enrico:
Enrico Maria Giordano wrote:Ok, let's see it from the other side: what is the right control to get a colored square perimeter?

You could try TSLines class which is part of TSButton.lib

You can download it from:
http://www.box.net/shared/9vyw4zeo0k

God bless your family this Christmas day and ever
manuelmercado at prodigy dot net dot mx
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to assign a color to TGroup
Posted: Wed Dec 23, 2009 04:31 PM

Thank you Manuel, but I'd prefer to use standard FWH classes, if possible.

EMG

Continue the discussion