cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
neill_long
Level: Powered On

UpdateContext and Visibility

I have a button on my gallery that when you click it, a label appears.  The button has on it's onselect:

 

UpdateContext({Click: ThisItem.Clue})

 

The label has on it's text property:

 

Click

 

What i would like, is when the button is pressed, the button disappears and only displays the clue.

 

I thought if i put !Click on the Visible property of the button would work but the button disappears even though it hadn't been pressed yet.

 

Can anyone help?

 

thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Administrator
Administrator

Re: UpdateContext and Visibility

Hi @neill_long,

You're very close. If I understand correctly, you want the label to appear upon the click of a button. There's a few solutions you can use here. 

 

I like variables, but this looks like a job for a transparent checkbox. You have two states which affect visibility of controls, and you may want a different state for each row in the gallery. The checkbox is ideal in this situation because it keeps track of two states independently for each row.

 

  1. Insert a checkbox into the gallery.
  2. Change its CheckboxSize to 0 so no checkbox appears.
  3. Erase its default text.
  4. Resize it so it covers the gallery's template size.
  5. Change the Visible property of the label to Checkbox.Value so it appears when the checkbox is checked.
  6. Change the Label's text property to ThisItem.Clue.

Let me know if I understood your scenario correctly.

 

Mr. Dang

2 REPLIES 2
Administrator
Administrator

Re: UpdateContext and Visibility

Hi @neill_long,

You're very close. If I understand correctly, you want the label to appear upon the click of a button. There's a few solutions you can use here. 

 

I like variables, but this looks like a job for a transparent checkbox. You have two states which affect visibility of controls, and you may want a different state for each row in the gallery. The checkbox is ideal in this situation because it keeps track of two states independently for each row.

 

  1. Insert a checkbox into the gallery.
  2. Change its CheckboxSize to 0 so no checkbox appears.
  3. Erase its default text.
  4. Resize it so it covers the gallery's template size.
  5. Change the Visible property of the label to Checkbox.Value so it appears when the checkbox is checked.
  6. Change the Label's text property to ThisItem.Clue.

Let me know if I understood your scenario correctly.

 

Mr. Dang

neill_long
Level: Powered On

Re: UpdateContext and Visibility

@Mr-Dang-MSFT

 

This worked beautifully, thanks very much for your help.