FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Group Label
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Group Label
Posted: Mon Oct 15, 2018 04: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 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: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Group Label
Posted: Mon Oct 15, 2018 04:24 PM

Try:

oGroupPreview:setText( "Preview "+str(nWBmp)+"X"+str(nHBmp) )

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Group Label
Posted: Mon Oct 15, 2018 04:29 PM

yes

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: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Group Label
Posted: Tue Oct 16, 2018 01: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

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Group Label
Posted: Tue Oct 16, 2018 02:47 PM
Dear Rick

Add new DATA to CLASS TGroup
Code (fw): Select all Collapse
   DATA nClrBorder       // not INIT value, initial value is nil


Change METHOD Paint
Code (fw): Select all Collapse
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, ::oFont )

   .../...


So, in your code
Code (fw): Select all Collapse
      @ 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Group Label
Posted: Tue Oct 16, 2018 07: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 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

Continue the discussion