sanduro Member Licensed User Longtime User Jul 14, 2013 #1 Hi, I have created a simple layout, its loaded with Activity.LoadLayout ("Main") code. There is a button on layout called Button1. How can I access this button in runtime in order to modify his properties ? San
Hi, I have created a simple layout, its loaded with Activity.LoadLayout ("Main") code. There is a button on layout called Button1. How can I access this button in runtime in order to modify his properties ? San
nrasool Member Licensed User Longtime User Jul 14, 2013 #2 sanduro said: Hi, How can I access this button in runtime in order to modify his properties ? San Click to expand... You should have a sub called Button1_Click If you don't have that, then go back to the designer, click again on generate members, click on the + sign next to Button1, and you will see Button1_Click, make sure this is ticked as well, and again generate member Now in your code, you will see that sub, this will be how it is accessed Hope this helps Kind Regards Upvote 0
sanduro said: Hi, How can I access this button in runtime in order to modify his properties ? San Click to expand... You should have a sub called Button1_Click If you don't have that, then go back to the designer, click again on generate members, click on the + sign next to Button1, and you will see Button1_Click, make sure this is ticked as well, and again generate member Now in your code, you will see that sub, this will be how it is accessed Hope this helps Kind Regards
sanduro Member Licensed User Longtime User Jul 14, 2013 #3 Maybe I wasn't specific with question, I want to access Button class functions, like set another text, color, etc ... San Upvote 0
Maybe I wasn't specific with question, I want to access Button class functions, like set another text, color, etc ... San
klaus Expert Licensed User Longtime User Jul 14, 2013 #4 You need to Dim Button1 As Button in the Globals routine, this can also be done with 'Generate Members' from the Designer. Then after having loaded the layout file you can set every propety with: Button1.Text = "Test" Button1.Color = Colors.Red etc. Best regards. Upvote 0
You need to Dim Button1 As Button in the Globals routine, this can also be done with 'Generate Members' from the Designer. Then after having loaded the layout file you can set every propety with: Button1.Text = "Test" Button1.Color = Colors.Red etc. Best regards.