paulthepaddy
Well-known member
hello guys.
unfortuatly i havn't got any test code for this, as i dont know what way i am going to approach this yet.
at the moment i have a groupbox on a form with 3 radio buttons.
what i would like to happen is when a radio button is selected for it to display a panel with a few controls on it.
i am looking to know what is the best way to code this, i have read a few guides on creating objects at runtime, but none of which i have looked at have any information on adding objects to the likes of a panel.
i am thinking that their are probbably 2 way to attempt this.
my logical thinking tells me i should either
1) Create a class will contain the controls and subs that i need and then try to load the class when it is needed.
2)create a control array then try and work with it that way.
i personally think number 1 is the best option, but i cant figure out how to do this.
althought i know i am asking for code more so that help, if someone could give me the code for creating the panel and creating a label IN the panel, im sure i could then have a go at doing the rest myself.
i know im asking a lot, but any help will be much appreciated.
unfortuatly i havn't got any test code for this, as i dont know what way i am going to approach this yet.
at the moment i have a groupbox on a form with 3 radio buttons.
what i would like to happen is when a radio button is selected for it to display a panel with a few controls on it.
i am looking to know what is the best way to code this, i have read a few guides on creating objects at runtime, but none of which i have looked at have any information on adding objects to the likes of a panel.
i am thinking that their are probbably 2 way to attempt this.
my logical thinking tells me i should either
1) Create a class will contain the controls and subs that i need and then try to load the class when it is needed.
2)create a control array then try and work with it that way.
i personally think number 1 is the best option, but i cant figure out how to do this.
althought i know i am asking for code more so that help, if someone could give me the code for creating the panel and creating a label IN the panel, im sure i could then have a go at doing the rest myself.
i know im asking a lot, but any help will be much appreciated.