Need some advice- GUI design

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to have a boxed off area on my GUI which will behave essentially like
a very simple ListBox, with items stacking vertically in a list with a scroll
bar if the stacked items go beyond the bottom border.

The trick ypart is these items should be pretty large rounded -corner
rectangular panels which will contain a mix of Labels and a few simple form
elements such as TextFields, drop downs, etc.. These rounded rectangle panels
will be generated dynamically on run-time and use will be able to add/remove
entire items and be able to interact with the form elements within each item.

How could I best accomplish this?

I guess I will have to do some custom drawing on the outside Panel which
will create these rounded rectangle panels on demand and then start creating
and positioning the labels and form elements withing them before finally
displaying the result.

The problem is I never have done custom drawing in .NET- so I ened to ask do
you think this is pretty easy to accomplish? Do you have any suggestions on
anything specific I could do? Or maybe links to some great drawing tutorials
which might help?

thanks so much!
 
MrNobody said:
I want to have a boxed off area on my GUI which will behave essentially
like
a very simple ListBox, with items stacking vertically in a list with a
scroll
bar if the stacked items go beyond the bottom border.

The trick ypart is these items should be pretty large rounded -corner
rectangular panels which will contain a mix of Labels and a few simple
form
elements such as TextFields, drop downs, etc.. These rounded rectangle
panels
will be generated dynamically on run-time and use will be able to
add/remove
entire items and be able to interact with the form elements within each
item.

How could I best accomplish this?

I guess I will have to do some custom drawing on the outside Panel which
will create these rounded rectangle panels on demand and then start
creating
and positioning the labels and form elements withing them before finally
displaying the result.

The problem is I never have done custom drawing in .NET- so I ened to ask
do
you think this is pretty easy to accomplish? Do you have any suggestions
on
anything specific I could do? Or maybe links to some great drawing
tutorials
which might help?

thanks so much!

Hi,

Personally I would create the panels you speak of as user controls. A user
control is very similar to a form to create, in that it can have all the
controls you mentioned as children, and you create the event handlers etc.
in the same manner.

You could even go so far as to create a bitmap image, of a nicely rounded 3D
rectangular background for example, and use that as the background for the
control.

The user control can be instantiated "on the fly" as normal, and nicely
encapsulates that part of your app.

If you then use a scrollable control, place a panel in it and resize the
panel to fit the new user controls as they are added, then you have your
solution.

You will need to read a little about user controls, but I'm sure you'll have
a working test app quite quickly.

HTH

MFK.
 
Back
Top