Group Box Frame Color ( again ) .. Nags?

Group Box Frame Color ( again ) .. Nags?

Postby Rick Lipkin » Fri Apr 10, 2020 6: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: Select all  Expand view

     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
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Group Box Frame Color ( again ) .. Nags?

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6784
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group Box Frame Color ( again ) .. Nags?

Postby karinha » Sat Apr 11, 2020 1:00 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7237
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Group Box Frame Color ( again ) .. Nags?

Postby Rick Lipkin » Sat Apr 11, 2020 3:18 pm

Gentleman

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

Code: Select all  Expand view


   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
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Group Box Frame Color ( again ) .. Nags?

Postby nageswaragunupudi » Sun Apr 12, 2020 1:38 pm

Rick Lipkin wrote:Gentleman

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

Code: Select all  Expand view


   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
User avatar
nageswaragunupudi
 
Posts: 10253
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Group Box Frame Color ( again ) .. Nags?

Postby Rick Lipkin » Sun Apr 12, 2020 3: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
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Group Box Frame Color ( again ) .. Nags?

Postby nageswaragunupudi » Sun Apr 12, 2020 4:08 pm

Please try
Code: Select all  Expand view
   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
User avatar
nageswaragunupudi
 
Posts: 10253
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Group Box Frame Color ( again ) .. Nags?

Postby Rick Lipkin » Mon Apr 13, 2020 1:05 pm

Rao

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

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2628
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: richard-service and 14 guests