WindowsForms - Dynamic Controls

Started by
4 comments, last by GameDev.net 17 years, 4 months ago
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?
Advertisement
Assuming that you are adding the controls to a panel, have you tried wrapping the create and delete of controls with .SuspendLayout and .ResumeLayout ?


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.
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
Cheers! That's helped somewhat, still got a slight jitter, but hey. Still, if anyone has any recommendations for controls to display and edit array data i'm all ears....

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.

As far as displaying the array of data, you could use the datagrid control. Set the datasource to the array variable.

This topic is closed to new replies.

Advertisement