469,915 Members | 2,457 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,915 developers. It's quick & easy.

Can I do dynamic GUI components like in Java?

One thing I encountered a problem with when porting some Java code to C# is
that some GUIs in Java all the widgets are basicaly evolved from one class
and it gives you some strange flexibility like adding any component to other
components. Like having a JList you can add ListItems but they can be
anything from combo boxes to labels to even stuff like tables. Is it possible
to do something like this in C#? How do I handle this?
Aug 21 '06 #1
1 1764
"MrNobody" <Mr******@discussions.microsoft.comwrote in message
news:38**********************************@microsof t.com...
One thing I encountered a problem with when porting some Java code to C#
is
that some GUIs in Java all the widgets are basicaly evolved from one class
and it gives you some strange flexibility like adding any component to
other
components. Like having a JList you can add ListItems but they can be
anything from combo boxes to labels to even stuff like tables. Is it
possible
to do something like this in C#? How do I handle this?
You probably need to ask a much more specific question, and you probably you
need to spend some time learning how Windows Forms works. For a WinForms
application, the entire UI is built dynamically, creating controls at
runtime and gluing them together to form the UI - just take a look at the
"designer generated" code in YourForm.Designer.cs.

Since I don't know exactly what a JList is, I can't tell you exactly where
to look for the equivalent, but I'd guess that it's something like a
TableLayoutPanel in windows forms (but unless JList has a lot more
functionality than the name suggests, TLP probably does quite a lot more).

-cd
Aug 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by jonathan | last post: by
13 posts views Thread by mr_burns | last post: by
reply views Thread by Pascal Costanza | last post: by
5 posts views Thread by Guillermo Schwarz | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.