#1 2016-06-27 20:14:37

IAMREDJOHN
Member
Registered: 2016-01-28
Posts: 4

Switching a control's hidden attribute from hidden to true in code

I am doing a simple test to switch a label control's attribute from hidden (initially) to visible (activated with a push of a button).

My label control is named lblSayHello.
My button control is named btnSayHello.

Within the btnSayHello code tab (yes the click event is selected at the bottom), I have tried the following combinations but none of them make the label control (lblSayHello) visible:

SetAttribute "lblSayHello" "hidden" "False"
SetVar "[lblSayHello.Hidden]" "False" "String"

I am using version 2016.133 of App Builder.

Thank you in advance.

Offline

#2 2016-06-27 20:39:51

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Switching a control's hidden attribute from hidden to true in code

Hello John,

You can use the Show, Hide and Toggle actions if you like. If you want to use the "Hidden" variable you can do it too, just the below way:

// To hide the control, set "Hidden" non empty: "true" by convention
SetVar "[lblSayHello.Hidden]" "true" "String"
// To show the control, set "Hidden" to empty
SetVar "[lblSayHello.Hidden]" "" "String"

The "Hidden" variable is explained at the App's controls help topic.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.