Re: Difference between Panel and GroupBox



Thank you Bonnie.

"Bonnie Berent [C# MVP]" <BonnieBerentCMVP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:F933A486-259E-4528-BEEC-3238B8A6BB24@xxxxxxxxxxxxxxxx
> 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" wrote:
>
>> But pannel also does the same thing. Why not using pannel?
>>
>>
>> "Bonnie Berent [C# MVP]" <BonnieBerentCMVP@xxxxxxxxxxxxxxxxxxxxxxxxx>
>> wrote
>> in message news:7B5D98D2-6FCD-42FE-964F-FB6D8CB6CAF9@xxxxxxxxxxxxxxxx
>> >> 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" wrote:
>> >
>> >> Thank you for help.
>> >>
>> >> Is there any reason that I should use GroupBox instead of Pannel at
>> >> all ?
>> >>
>> >>
>> >>
>> >> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
>> >> news:upoOk19FGHA.2608@xxxxxxxxxxxxxxxxxxxxxxx
>> >> > "A.M-SG" <alanalan@xxxxxxxxxxxxxxxx> schrieb:
>> >> >> 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.
>> >> >
>> >> > --
>> >> > M S Herfried K. Wagner
>> >> > M V P <URL:http://dotnet.mvps.org/>
>> >> > V B <URL:http://classicvb.org/petition/>
>> >>
>> >>
>> >>
>>
>>
>>


.



Relevant Pages

  • Re: Difference between Panel and GroupBox
    ... > Thank you Bonnie. ... >> OK, yeah, you can have a visible border with a Panel, so in that respect ... >> ListView. ... >>> But pannel also does the same thing. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Problem with vertical scroll on a ListView control
    ... it continues to fail with a standard ListView ... I suspect is that this is some issue with the ListView not really knowing what size it is because the 'panel' is resizing without ... setting contained control sizes? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Getting listview doublebuffered and exporting OnPaint method problem
    ... listview inside a panel that would have more controls (The panel would ... Graphics grBuffer = Graphics.FromImage; ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: How to detect whether Panel got scrollbar ?
    ... >> Hi Daniel Moth, ... >> Thanks for ur suggestion. ... >> I tried out ur method and the problem is that the ListView is dock in the ... >> panel container and the height of the ListView is always the same as the ...
    (microsoft.public.dotnet.framework.compactframework)
  • [.Net 1.1] Strange error
    ... and I add/remove controls (ListView only) to/from it programatically. ... probaly when redrawing the panel while adding/removing controls or scrolling the panel i get an infinite loop of messageboxes saying "invalid parameter used" but no exceprion is thrown. ...
    (microsoft.public.dotnet.framework.windowsforms)