FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Group Box Frame Color ( again ) .. Nags?
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Group Box Frame Color ( again ) .. Nags?
Posted: Fri Apr 10, 2020 06:02 PM
To All

I can not find the correct example in the forum .. I believe Nags came up with this code to add color to the group frame ..

Code (fw): Select all Collapse
     oGrps:bPainted := < |hDC|
     RoundBox( hDC, 20,30,445,300,10,10,CLR_BLACK, 1 )
     Return nil
     >

   oGrps:bPainted := < |hDC|
      RoundBox( hDC, 20,340,445,500,10,10,CLR_HRED, 1 )
      Return nil
      >


And this code works well if you only want to color the RoundBox for the first instance .. but I have 2 group boxes on the same form and it is the last box that is drawn .. I do kinda see that the roundBox is directly tied to the hDc instance ..

Is there a way to modify this code to handle two or more group boxes on the same form ?

Thanks
Rick Lipkin
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Fri Apr 10, 2020 11:47 PM

color codeblocks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Sat Apr 11, 2020 01:00 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Sat Apr 11, 2020 03:18 PM
Gentleman

Unfortunately this code does not work probably due to my use of the XP Manifest

Code (fw): Select all Collapse
   REDEFINE GROUP oGrp2 ID 209 of oGrps ;
            COLOR RGB(32,32,32), CLR_HRED ;
            PIXEL FONT oFontB


Appreciate your help .. unfortunately this was not the answer :-) .. any other solutions ?

Thanks
Rick Lipkin
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Sun Apr 12, 2020 01:38 PM
Rick Lipkin wrote:Gentleman

Unfortunately this code does not work probably due to my use of the XP Manifest

Code (fw): Select all Collapse
   REDEFINE GROUP oGrp2 ID 209 of oGrps ;
            COLOR RGB(32,32,32), CLR_HRED ;
            PIXEL FONT oFontB


Appreciate your help .. unfortunately this was not the answer :-) .. any other solutions ?

Thanks
Rick Lipkin

Yes. With manifest it does not work.
You need to draw boxes manually.
Please recheck your code.
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Sun Apr 12, 2020 03:39 PM

Rao

In my original post .. the first RoundBox() instance works .. but try to use RoundBox() a second time .. takes president over the first instance .. and the first instance is no longer drawn.

I know it has something to do with the Dialog handle .. any advice or expertise is welcome.

Thanks
Rick Lipkin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Sun Apr 12, 2020 04:08 PM
Please try
Code (fw): Select all Collapse
    oDlg:bPainted := < |hDC|
      RoundBox( hDC, 20,30,445,300,10,10,CLR_BLACK, 1 )
      RoundBox( hDC, 20,340,445,500,10,10,CLR_HRED, 1 )
      Return nil
      >
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Group Box Frame Color ( again ) .. Nags?
Posted: Mon Apr 13, 2020 01:05 PM

Rao

Thank you ... I appreciate your help.. your suggestion worked Great!!

Rick Lipkin

Continue the discussion