How do you make a new control during runtime ?
like a label ?
Printable View
How do you make a new control during runtime ?
like a label ?
You can do that. easiest way is to have a label at design time and create label as a control array (same name, different index). You can use load function to load labels at run time. Not to mention you are going to have to control there attributes like Appearance, Left, Top, Width etc .. at run time.Quote:
Originally posted by Luke1
How do you make a new control during runtime ?
like a label ?
First let me make a couple of suggestions.
Use a more descriptive suject for your post. "How do you create controls at runtime?" would have been one possibility.
Search the forum. I did a search for control AND runtime and came up with a lot of hits including
this one from IROY55.
Those suggestions and others you might find helpful are in the post you'll be directed to if you click the "How to get your questions answered" in my signature.
I have a question...
is there anyway you can change the style during runtime since the control style is a read-only while the app is running? I guess what i am asking is there a way to change the style from read only? :confused:
The style of what?
:confused:
When you say "style" we don't know for sure what kind of control you are talking about. Do you mean the Style property of a ComboBox? Anyhow, most properties of controls can be changed while the program is running, but there are some that can't like the Style property of the ComboBox or the Sorted property of the ListView control.
The Sorted property of a ListView can be changed at runtime.Quote:
Originally posted by MartinLiss
When you say "style" we don't know for sure what kind of control you are talking about. Do you mean the Style property of a ComboBox? Anyhow, most properties of controls can be changed while the program is running, but there are some that can't like the Style property of the ComboBox or the Sorted property of the ListView control.
Yes, sorry, I meant to say ListBox.Quote:
Originally posted by Mc Brain
The Sorted property of a ListView can be changed at runtime.