D darkuni Member Licensed User Longtime User Feb 1, 2012 #1 When you visually create a layout with an EditText view, load it into the activity - I notice you cannot reference it directly: EditText1.text ... simply doesn't show up as being available. How do you "link" the layout views proper to your activity code? Most of the demos I've seen appear to revolve around creating views programmatically, not accessing the from a layout created by the designer. Thanks
When you visually create a layout with an EditText view, load it into the activity - I notice you cannot reference it directly: EditText1.text ... simply doesn't show up as being available. How do you "link" the layout views proper to your activity code? Most of the demos I've seen appear to revolve around creating views programmatically, not accessing the from a layout created by the designer. Thanks
NJDude Expert Licensed User Longtime User Feb 1, 2012 #2 When you create views using the designer you have to click on "Tools -> Generate Members" Upvote 0
klaus Expert Licensed User Longtime User Feb 1, 2012 #3 You need to have following line in the Globals routine. B4X: Dim EditText1 As EditText This can be done with the GenerateMembers function in the Designer. Look at chapter 8.2.1 GenerateMembers in the Beginner's Guide. Best regards. Upvote 0
You need to have following line in the Globals routine. B4X: Dim EditText1 As EditText This can be done with the GenerateMembers function in the Designer. Look at chapter 8.2.1 GenerateMembers in the Beginner's Guide. Best regards.
D darkuni Member Licensed User Longtime User Feb 1, 2012 #4 Right right .. I knew about Generate Members. I guess the concept of "declaring" it in the designer then still having to put code to "declare" again (even if it's generated) it didn't make sense to me. Thanks everyone ... I'll just add the declaration code, and I'll be set. Upvote 0
Right right .. I knew about Generate Members. I guess the concept of "declaring" it in the designer then still having to put code to "declare" again (even if it's generated) it didn't make sense to me. Thanks everyone ... I'll just add the declaration code, and I'll be set.