Updating Form's lable from external Class , not working !!!
-
I have control Lable on Form , I wanted to update text propertrty of that control from another class in same namepsace so I expose that label control visa public property . and now I m using that property in my other class for setting text fro that lable .. but the new text is not displaying on Form ??? What I am doing wrong here ??? Class Form1 { public string updatelable { get { return label.text ; } set { label.Text = (string)value; } and using it in my other class as Form1 f = new Form1(); f.updatelable = "abc"; but its not working... what I m doing wrong here ??? Thanks
HELLO
-
I have control Lable on Form , I wanted to update text propertrty of that control from another class in same namepsace so I expose that label control visa public property . and now I m using that property in my other class for setting text fro that lable .. but the new text is not displaying on Form ??? What I am doing wrong here ??? Class Form1 { public string updatelable { get { return label.text ; } set { label.Text = (string)value; } and using it in my other class as Form1 f = new Form1(); f.updatelable = "abc"; but its not working... what I m doing wrong here ??? Thanks
HELLO
-
I have control Lable on Form , I wanted to update text propertrty of that control from another class in same namepsace so I expose that label control visa public property . and now I m using that property in my other class for setting text fro that lable .. but the new text is not displaying on Form ??? What I am doing wrong here ??? Class Form1 { public string updatelable { get { return label.text ; } set { label.Text = (string)value; } and using it in my other class as Form1 f = new Form1(); f.updatelable = "abc"; but its not working... what I m doing wrong here ??? Thanks
HELLO
You can only update the control in the UI thread. You'll need to use invoke, or some other method to update the text on the label.
only two letters away from being an asset
-
You can only update the control in the UI thread. You'll need to use invoke, or some other method to update the text on the label.
only two letters away from being an asset
I am using Asynchronous methods in my extern class and trying to update UI from these methods . I have created a delegate and delegate method in Form1 class and when I tried to invoke delegate from external class it says definition of invoke does't exist in current reference ... ??? What I m doing wrong here ? Thanks
-
I am using Asynchronous methods in my extern class and trying to update UI from these methods . I have created a delegate and delegate method in Form1 class and when I tried to invoke delegate from external class it says definition of invoke does't exist in current reference ... ??? What I m doing wrong here ? Thanks