gapi Active Member Licensed User Longtime User Apr 13, 2012 #1 How can I call a button from layout after Activity.LoadLayout("mylayout") ? I must disabled a button if File.Exists() return false. thanks
How can I call a button from layout after Activity.LoadLayout("mylayout") ? I must disabled a button if File.Exists() return false. thanks
NJDude Expert Licensed User Longtime User Apr 13, 2012 #2 To disable a button (assuming you have a button named Button1): B4X: Button1.Enabled = False Last edited: Apr 13, 2012 Upvote 0
gapi Active Member Licensed User Longtime User Apr 13, 2012 #3 Error occurred .... Object should be initialized (Button) !!! Upvote 0
klaus Expert Licensed User Longtime User Apr 13, 2012 #4 What's the name of the Button in the layout. You must Dim it in Globals with the same name. And access it still with this same name. Best regards. Upvote 0
What's the name of the Button in the layout. You must Dim it in Globals with the same name. And access it still with this same name. Best regards.
NJDude Expert Licensed User Longtime User Apr 13, 2012 #5 gapi said: Error occurred .... Object should be initialized (Button) !!! Click to expand... 1- What's the name of the button in your layout? 2- Did you "Generated Members" in the designer? What I posted above is a sample, you have to change it according to your needs. Last edited: Apr 13, 2012 Upvote 0
gapi said: Error occurred .... Object should be initialized (Button) !!! Click to expand... 1- What's the name of the button in your layout? 2- Did you "Generated Members" in the designer? What I posted above is a sample, you have to change it according to your needs.