Change layout values in code

Malky

Active Member
Licensed User
Longtime User
I need to change the layout values, image, texts and button names etc depending on a previous selection.
How do I access these values to change them?

i.e. Activity.LoadLayout("details") I need to change the image which has an imageview name of imgProperty.

Malky
 

JonPM

Well-Known Member
Licensed User
Longtime User
Did you select Generate Members in the designer? This will add the code to your activity so you can modify views
 
Upvote 0

madSac

Active Member
Licensed User
Longtime User
I need to change the layout values, image, texts and button names etc depending on a previous selection.
How do I access these values to change them?

i.e. Activity.LoadLayout("details") I need to change the image which has an imageview name of imgProperty.

Malky

".......change......button names......." , What you actually want to do ?
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
I have a layout with components, (just cut it to a label for now). I need to change that label text dynamically.

Malky
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
B4X:
yourLabel.text="your text"
As JonPM already said, firstly you should generate members from the designer ('dim yourLabel' would show up in the globals sub).
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Ah, I see now. I thought I only had to generate items with an associated event, button.click etc!

Will try that now.

Many thanks guys,

Malky
 
Upvote 0
Top