I have a page where I have to modify variables which are strings with pairs of values and labels. I was using a datagrid object but its not sufficient for whats required ( or eventually will not anyway ).
So I have a form which is a text label and textbox, and a flowpanel, and I’m trying to programmatically add instances of this form for each variable to the flowpanel, and Im getting nothing. Googling for the solution bring sup lots of video tutorials involving clicking on buttons in the UI designer and dropping them on flow panels, I want to do this programmatically however.
What is the ‘correct’ or ‘standard’ way of doing this.
The data (in pairs) sounds like it might fit better with a
TableLayoutPanel, but the theory is the same; just call.Controls.Add(...)and it should work:or with a
TableLayoutPanel:Also – I wonder if a
PropertyGridwould fit your needs better? This will handle all the ‘get value’, ‘show value’, ‘parse value’, ‘store value’ logic, and can be plugged with things likeICustomTypeDescriptorto allow dynamic properties.