473,379 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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 1847
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jonathan | last post by:
hey all, I'd like to implement an application that is truly dynamic: the components are not only just known at runtime, but also the components are unknown at runtime: ie: some don't even ship...
13
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
4
by: jrefactors | last post by:
I want to distinguish between static SQL, dynamic SQL, and embedded SQL, but couldn't find too much useful resources in the web. For example, if we put SQL statements (SELECT, INSERT, UPDATE,...
4
by: Charlie | last post by:
I am trying to create dynamic content in a Windows Form using external data to determine UI elements. The code works fine at runtime. I have tried adding code in Sub New, after...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
0
by: vidhyasreddy | last post by:
Hi All, While we are Localizing our product we faced below problem: java.awt components not able to display some non-english charecters like \u2019 , \u2018 , \u2026 , \u2013 , \u8230 . ...
5
by: Kursat | last post by:
Hi, I want to add new collapsable panel items using java script at client side. Is this possible to create Ajax components like collapsable panel without server round trip? Thanks in advance.
5
by: Guillermo Schwarz | last post by:
C++ers, I have programmed in C++ since 1991 and I probably created my best abstraction layers in C++ in those days. Since 2001 I've been programming in Java (at first against my will, then I...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.