cancel
Showing results for 
Search instead for 
Did you mean: 

Hide/Show a button on a tile, based on the tileset you're in.

Former Member
0 Kudos

Hey,

I made a new tileset Z_CustomerPlan, it has an existing tile in it, capshort1.

I added a button to this existing tile capshort1, named Z_BTNPreviewAll.

But this button should ONLY be visible when in the new tileset Z_CustomerPlan because capshort1 is used in some other tilesets.

i tried to do this with the following code in the onload event of capshort1:

if not mcore.uftileset = "SZ_CustomerPlan" then

ctrlZ_BTNPreviewAll.visible = false

end if

but this isnt working, it makes the button invisible on all tilesets, including Z_CustomerPlan.

So im trying to show/hide the button based on the tileset... is this the right way?

Some help would be nice.

Cheers,

Maarten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Maarten,

You doing everything right. I'm not sure why it' not working for you. Maybe because of it is a button ? What Type is it ?

I have done the same thing now in the debug mode, and was able to hide a Country textbox on the capshort1 tile. It is visible only on the BP-> Addresses that I have specified in the code:

If Not mCore.ufTileset = "sMSACAPAddresses" Then

ctrlctrlCountry.visible = False

End If

Tyr it again. Strange.

Also, I would do that on Before_Load, because when you have this code in the OnLoad, you can see the control for a split second before it actually disappears.

Regards,

Vadim.

Former Member
0 Kudos

Hey Vadim,

After an intensive investigation i came to the following conclusion...

if not mcore.uftileset = "SZ_CustomerPlan" then

ctrlZ_BTNPreviewAll.visible = false

end if

does not work, BUT..

if not mcore.uftileset = "sZ_CustomerPlan" then

ctrlZ_BTNPreviewAll.visible = false

end if

..does work

can you spot the difference?:)

apparently it HAS to be a little s

just glad its working now, i put it in the beforeload like you suggested, thx for the tip

cheers,

Maarten

Former Member
0 Kudos

Maarten,

Thank you for awarding me.

I'm glad it is working. Strange that "s" is the root of this weird issue.

Regards,

Vadim.

Answers (0)