Difference between Panel and GroupBox

A

A.M-SG

Hi,



I understand that GroupBox provides a caption and border around a group of
controls, but other than that, what is the different between a Panel and
GroupBox?



Thank you,

Alan
 
H

Herfried K. Wagner [MVP]

A.M-SG said:
I understand that GroupBox provides a caption and border around a group of
controls, but other than that, what is the different between a Panel and
GroupBox?

Groupbox is not scrollable.
 
A

A.M-SG

Thank you for help.

Is there any reason that I should use GroupBox instead of Pannel at all ?
 
G

Guest

Is there any reason that I should use GroupBox instead of Pannel at all ?

Sure there is! It's a great way to visually group things for your user.

~~Bonnie


A.M-SG said:
Thank you for help.

Is there any reason that I should use GroupBox instead of Pannel at all ?
 
A

A.M-SG

But pannel also does the same thing. Why not using pannel?


Bonnie Berent said:
Is there any reason that I should use GroupBox instead of Pannel at all ?

Sure there is! It's a great way to visually group things for your user.

~~Bonnie
 
G

Guest

OK, yeah, you can have a visible border with a Panel, so in that respect you
have a visual cue for the user that you are grouping stuff together. However,
there is no caption, so there's no way to label that Panel without dropping a
Label control there somewhere too. I still prefer the GroupBox for this sort
of visual cue.

In my opinion, the purpose of Panels is to divide up a form when needed for
scrollbars and such. For example, you have a ListView on your form that takes
up the whole width of the form, but you also have a spot where you need to
put TextBoxes to be databound to whatever's being selected in that ListView.
You need to have the TextBox area on a Panel that is docked to the bottom of
the form and the ListView is docked to Fill with a splitter in between them.

~~Bonnie
 
A

A.M-SG

Thank you Bonnie.

Bonnie Berent said:
OK, yeah, you can have a visible border with a Panel, so in that respect
you
have a visual cue for the user that you are grouping stuff together.
However,
there is no caption, so there's no way to label that Panel without
dropping a
Label control there somewhere too. I still prefer the GroupBox for this
sort
of visual cue.

In my opinion, the purpose of Panels is to divide up a form when needed
for
scrollbars and such. For example, you have a ListView on your form that
takes
up the whole width of the form, but you also have a spot where you need to
put TextBoxes to be databound to whatever's being selected in that
ListView.
You need to have the TextBox area on a Panel that is docked to the bottom
of
the form and the ListView is docked to Fill with a splitter in between
them.

~~Bonnie


A.M-SG said:
But pannel also does the same thing. Why not using pannel?


"Bonnie Berent [C# MVP]" <[email protected]>
wrote
in message news:[email protected]...
Is there any reason that I should use GroupBox instead of Pannel at
all ?

Sure there is! It's a great way to visually group things for your user.

~~Bonnie


:

Thank you for help.

Is there any reason that I should use GroupBox instead of Pannel at
all ?



I understand that GroupBox provides a caption and border around a
group
of controls, but other than that, what is the different between a
Panel
and GroupBox?

Groupbox is not scrollable.
 
G

Guest

You're welcome! =)

~~Bonnie



A.M-SG said:
Thank you Bonnie.

Bonnie Berent said:
OK, yeah, you can have a visible border with a Panel, so in that respect
you
have a visual cue for the user that you are grouping stuff together.
However,
there is no caption, so there's no way to label that Panel without
dropping a
Label control there somewhere too. I still prefer the GroupBox for this
sort
of visual cue.

In my opinion, the purpose of Panels is to divide up a form when needed
for
scrollbars and such. For example, you have a ListView on your form that
takes
up the whole width of the form, but you also have a spot where you need to
put TextBoxes to be databound to whatever's being selected in that
ListView.
You need to have the TextBox area on a Panel that is docked to the bottom
of
the form and the ListView is docked to Fill with a splitter in between
them.

~~Bonnie


A.M-SG said:
But pannel also does the same thing. Why not using pannel?


"Bonnie Berent [C# MVP]" <[email protected]>
wrote
in message Is there any reason that I should use GroupBox instead of Pannel at
all ?

Sure there is! It's a great way to visually group things for your user.

~~Bonnie


:

Thank you for help.

Is there any reason that I should use GroupBox instead of Pannel at
all ?



I understand that GroupBox provides a caption and border around a
group
of controls, but other than that, what is the different between a
Panel
and GroupBox?

Groupbox is not scrollable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top