Sign in to follow this  

WindowsForms - Dynamic Controls

This topic is 4038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hallo, just a quick bit of advice needed. I've got a Windows form based interface which allows me to inspect and modify all class data within my Game Engine. It consists of a TreeView on the Left listing the data objects, and on the right is a panel that gets filled with a set of attribute controls to allow you to modify the attributes of the data objects. So far so good, it's all working fairly nicely apart from one thing, which hopefully someone may be able to give me some advice about. At the moment, i'm simply creating CheckBoxes, TextFields etc in the right panel to handle the attributes. However : a) When re-creating the controls (after selecting a new data object) you can see the controls being re-created and deleted. (It seems like there's blatantly a better way to do this stuff) b) This sucks big time when trying to display an array ;) I'm assuming that there are far better controls to use for displaying data in this fashion, however the DataGridView & DataSet only seem to work with Sql (as far as i can tell)? Anyone got any better recommendations?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Assuming that you are adding the controls to a panel, have you tried wrapping the create and delete of controls with .SuspendLayout and .ResumeLayout ?

Share this post


Link to post
Share on other sites


If you are complaining about seeing it drawn, you could open a seperate window
and use the Show/Hide command (and only Show it after its been drawn).


If you are complaining about arrays being too large, are you using a control with a scroll bar to keep its visible size under control????

ListViews can be used to display multi column data array elements.
If array structyre gets too large then open a seperate window to show all its data
and have the base list only show the ones used for indeing/identifying each row.

Share this post


Link to post
Share on other sites
Quote:
If you are complaining about seeing it drawn, you could open a seperate window
and use the Show/Hide command (and only Show it after its been drawn).


I'm kinda aiming for a Maya-esq Attribute Editor, so i'd prefer to keep it in one window if possible.

Quote:
If you are complaining about arrays being too large, are you using a control with a scroll bar to keep its visible size under control????


yeah, it's got a scroll bar ;)

Quote:
ListViews can be used to display multi column data array elements.
If array structyre gets too large then open a seperate window to show all its data
and have the base list only show the ones used for indeing/identifying each row.


I'll take a stab at that and see how it goes.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
As far as displaying the array of data, you could use the datagrid control. Set the datasource to the array variable.

Share this post


Link to post
Share on other sites

This topic is 4038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this