New class : TGroupEx

Post Reply
User avatar
Silvio.Falconi
Posts: 7348
Joined: Thu Oct 18, 2012 7:17 pm

New class : TGroupEx

Post by Silvio.Falconi »

I created a new custom control class called TGroupEx, based on TControl, which implements an expandable/collapsible panel system similar to an accordion container. It was not made by modifying explorerbar or other classes, it is an old project of mine that you will find in this forum but never finished.

Image

Key features:

Custom header design
Support for header images
Expand/collapse button
Transparent background support
Automatic repositioning of related panels
Dynamic display/hide of child controls
Fluid resizing without width alteration

I think this control could be useful as a reusable component for accordion/group containers in FiveWin.

a simple application for an order for how you can use the class

Image

The Tgroupex class works alone or together with others when it is together with others it behaves like the famous html accordion

easy syntax

creating groups

Code: Select all | Expand

@ 10, 10 GROUPEX oGrp1 OF oDlg SIZE 540, 150 TITLE "Dati alunno" IMAGE ".\bitmaps\pngs\fruit.png" PIXEL
@ 170,10 GROUPEX oGrp2 OF oDlg SIZE 540, 120 TITLE "Permesso" IMAGE ".\bitmaps\pngs\fruit.png" PIXEL
@ 300,10 GROUPEX oGrp3 OF oDlg SIZE 540, 130 TITLE "Motivo" IMAGE ".\bitmaps\pngs\fruit.png" PIXEL

Link group together

Code: Select all | Expand

 [code]  LINK GROUPS { oGrp1, oGrp2, oGrp3 } [/code]

set style for each group

Code: Select all | Expand

      SET STYLE OF oGrp1 TO 1 THEME 1
      SET STYLE OF oGrp2 TO 2 THEME 1
      SET STYLE OF oGrp3 TO 2 THEME 1

set last Stretch

Code: Select all | Expand

   SET LAST  OF oGrp3 STRETCH
Last edited by Silvio.Falconi on Thu May 21, 2026 8:11 pm, edited 3 times in total.
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
User avatar
Willi Quintana
Posts: 1070
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú
Contact:

Re: New class : TGroupEx

Post by Willi Quintana »

Felicitaciones, excelente aporte.

toninhofwi
Posts: 183
Joined: Tue Oct 18, 2005 10:01 am

Re: New class : TGroupEx

Post by toninhofwi »

Nice work 😮

User avatar
RAMESHBABU
Posts: 668
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: New class : TGroupEx

Post by RAMESHBABU »

Dear Silvio,

As usually, a Good Work. :D

-Ramesh Babu P

User avatar
RAMESHBABU
Posts: 668
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: New class : TGroupEx

Post by RAMESHBABU »

Dear Silvio,

As usually, a Good Work. :D

A small suggestion, If the Bitmaps are painted after the Groupbox paint, they look good.
The Groupbox is painted transparent on Groupbox and groupbox lines are appearing on
the Groupbox.

-Ramesh Babu P

User avatar
Silvio.Falconi
Posts: 7348
Joined: Thu Oct 18, 2012 7:17 pm

Re: New class : TGroupEx

Post by Silvio.Falconi »

RAMESHBABU wrote: Fri May 22, 2026 11:21 pm

Dear Silvio,

As usually, a Good Work. :D

A small suggestion, If the Bitmaps are painted after the Groupbox paint, they look good.
The Groupbox is painted transparent on Groupbox and groupbox lines are appearing on
the Groupbox.

-Ramesh Babu P

I'm trying hard to understand, if you want to explain better please

the title is highlighted when you hover over it with the mouse, it is possible to associate an action to the title (bTitle) for example making a click.wav sound
Image

the class was born only with the button (window style and square and arrow up and down created by the class) then I was recommended a version with the circle and the possibility of inserting custom bmp/png is possible but they must be maximum 24x24 better smaller

Image

I improved the image resolution, the edge must be below or rather the edge should not reach the image as it is interrupted in the space where the title is
Image

zoom
Image

Thanks for the suggestion.

Actually the border is painted first and the header/bitmap is painted afterwards
so the bitmap is already drawn after the groupbox border.

The horizontal line is intentionally kept below the header area, similar to the standard Windows GroupBox style.
Maybe what you noticed is a small DPI/transparent rendering effect.

The bitmap is already painted after the GroupBox border.
The line below the header is intentional and follows the standard GroupBox style.

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
User avatar
Silvio.Falconi
Posts: 7348
Joined: Thu Oct 18, 2012 7:17 pm

Re: New class : TGroupEx

Post by Silvio.Falconi »

New features

  • OpenAll
  • CloseAll
  • btitle action

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
Post Reply