panel v groupBox?

  • Thread starter Thread starter Vincent Finn
  • Start date Start date
V

Vincent Finn

Can anyone tell me what the difference is?
Where I might need one over the other?

I know in VB there was a panel and no groupBox
in MFC there was a groupBox and no panel

But in C# they are both available and seem identical

Just curious

Vin
 
Vincent,

I groupbox will draw a border around the edge, whereas a panel will not
(you might be able to specify a border). Also, a groupbox will draw text on
the top in the border as well, whereas a panel will not.

Hope this helps.
 
The GroupBox has a title (its Text property) and a recessed 3D border; the
Panel has no title and a variety of border styles. The Panel can also scroll
its contents if they're too large to be displayed within the panel's
rectangle, whereas the GroupBox has no scrolling capability.

Tom Dacon
Dacon Software Consulting
 
Vincent,

I groupbox will draw a border around the edge, whereas a panel will not
(you might be able to specify a border). Also, a groupbox will draw text on
the top in the border as well, whereas a panel will not.

Hope this helps.

You can specify a border for the pane although not one that looks the
same as the group box

Thanks, Vin
 
The GroupBox has a title (its Text property) and a recessed 3D border; the
Panel has no title and a variety of border styles. The Panel can also scroll
its contents if they're too large to be displayed within the panel's
rectangle, whereas the GroupBox has no scrolling capability.

Tom Dacon
Dacon Software Consulting

OK, my curiosity is satisfied

It does seem like either of the two could have been extended to cover
the extra couple of properties though

Oh well, one of life's little mysteries

Thanks, Vin
 
Back
Top