Group Label

Group Label

Postby Silvio.Falconi » Mon Oct 15, 2018 4:01 pm

Can Update a label on a Group control ...if yes How ?

I made
oGroupPreview:cCaption:="Preview "+str(nWBmp)+"X"+str(nHBmp)
oGroupPreview:refresh()

not run !!!!
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group Label

Postby James Bott » Mon Oct 15, 2018 4:24 pm

Try:

oGroupPreview:setText( "Preview "+str(nWBmp)+"X"+str(nHBmp) )
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Group Label

Postby Silvio.Falconi » Mon Oct 15, 2018 4:29 pm

yes
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group Label

Postby Rick Lipkin » Tue Oct 16, 2018 1:43 pm

To All

I have asked this question before .. I am using the XP manifest and I would like to be able to control the color of the group frame .. On many of my gradient screens the 'default' white color just gets washed out and it is difficult to see the group frame ..

Just curious if there is a way to control the color of the group frame itself ?

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

Re: Group Label

Postby cnavarro » Tue Oct 16, 2018 2:47 pm

Dear Rick

Add new DATA to CLASS TGroup
Code: Select all  Expand view  RUN

   DATA nClrBorder       // not INIT value, initial value is nil
 


Change METHOD Paint
Code: Select all  Expand view  RUN

METHOD Paint() CLASS TGroup

   local aSize, hOldFont, oFont

   // Add this
   oFont = If( ::oFont != nil, ::oFont, ::oWnd:oFont )

   CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 )

   // Add this
   if !HB_IsNIL( ::nClrBorder )
      RoundBox( ::hDC, 0, Int( Abs( oFont:nHeight ) / 2 ) + 1, ::nWidth, ::nHeight - 1, 0, 0, ::nClrBorder )
   endif

   if IsAppThemed() .and. ! Empty( ::cCaption )
      // Remove this
      //oFont = If( ::oFont != nil, ::oFont, ::oWnd:oFont )

   .../...

 


So, in your code
Code: Select all  Expand view  RUN

      @ 10, 20 GROUP oGroup1 TO 60, 120 ;
         PROMPT "   HOLA   "  OF oParent ;
         COLOR Rgb( 32, 32, 32 ), CLR_WHITE ;
         PIXEL FONT oFont4
         // Add this
         oGroup1:nClrBorder  := CLR_BLUE
 


Please, try and tell me if run OK
I have not tried it without a manifest, please also try it like that
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Group Label

Postby Silvio.Falconi » Tue Oct 16, 2018 7:00 pm

On this forum I made many year ago a Group class modifies where I add color s and Image ..
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests