delete all label in windows form CLI
-
Hi I want delete or remove or clear all label from my form how can I do this? please give me an example.
-
Hi I want delete or remove or clear all label from my form how can I do this? please give me an example.
-
Unfortunately I don't understand your suggestion. Please explain more and give me a example. Thanks.
-
Unfortunately I don't understand your suggestion. Please explain more and give me a example. Thanks.
-
See http://stackoverflow.com/questions/15186828/loop-through-all-controls-on-a-form-even-those-in-groupboxes[^]. It's C# but the principle is the same.
Exactly I don'n know what I write. I barely know about windows form because I just start it. if you know equivalent of that code in c++,please help me.
-
Exactly I don'n know what I write. I barely know about windows form because I just start it. if you know equivalent of that code in c++,please help me.
If you are just starting Windows Forms you may find it easier to switch to C#. For a sample of C++ referencing Form Controls see https://msdn.microsoft.com/en-us/library/system.windows.forms.control.controls(v=vs.110).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1[^].
-
If you are just starting Windows Forms you may find it easier to switch to C#. For a sample of C++ referencing Form Controls see https://msdn.microsoft.com/en-us/library/system.windows.forms.control.controls(v=vs.110).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1[^].
Tank you but still there is a problem! I don't access label name because it made dynamically and before that i cant access to this label. Even I know label name the compiler don't allow me to remove in that way.
-
Tank you but still there is a problem! I don't access label name because it made dynamically and before that i cant access to this label. Even I know label name the compiler don't allow me to remove in that way.
Sorry, but I do not understand what you mean. If you are iterating through a collection of controls then you do not need their name. As you look at each control in the collection you get its type to check if it is a label. Then you read its content to see if it is one of the candidates for deletion.
-
Sorry, but I do not understand what you mean. If you are iterating through a collection of controls then you do not need their name. As you look at each control in the collection you get its type to check if it is a label. Then you read its content to see if it is one of the candidates for deletion.
Well,how can I get the controls type? is there any function to return this? And how I check it is label or not?
-
Well,how can I get the controls type? is there any function to return this? And how I check it is label or not?
-
I read them but they code are in c# and I don't know equivalent of this part in c++ : " C.GetType() == typeof(System.Windows.Forms.TextBox) " c.GetType exist in c++ but "typeof(System.Windows.Forms.TextBox)" no,do you know what is it in c++? (I'm sorry that I ask a lot question.)
-
I read them but they code are in c# and I don't know equivalent of this part in c++ : " C.GetType() == typeof(System.Windows.Forms.TextBox) " c.GetType exist in c++ but "typeof(System.Windows.Forms.TextBox)" no,do you know what is it in c++? (I'm sorry that I ask a lot question.)