cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ORhopeless
Frequent Visitor

How to set a text label to be unselectable

What i'm trying to do is have a validation error label display on top of a text box, without having the label "block" the selection of the text box.

 

So, something that looks like that attached image:

 

The issue i run into is that as soon as the red text label is visable, if the user clicks in that area, the text input box doen't get focus. How can i set this up so that the red text is visable, but the text input is 'on top' for purposes of the user selection?

 

Try as i might, i could not find a solution to this. I know it's a relatively petty issue, as i could resolve it by having the red text above or below the text box etc, but i'm a petty man so couldn't let it go.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ORhopeless
Frequent Visitor

The issue was that with the text input brought to front, it would cover the label. So even with visable=true, it would be behind the text input box. This made me realize that it can be resolved by simply setting the text input box to transparent, placing the label behind it, and then a 3rd box behind them both with the fill/color to achieve the same visual effect.  Thanks all!

View solution in original post

4 REPLIES 4
leyburn19
Memorable Member
Memorable Member

I would look at Setting the visble property of the label to false when the user attempts to click in the box. It will disappear but the use would likely have to selct the box again now.

I think i see what you mean. To have the label's onselect set the label's visable to false, so the user would end up selecting the label once, but on their second attempt would hit the text box? I suppose to also trigger a timer to bring the error message back after a couple seconds, to avoid the scenario where a user just clicks away the error and thinks they're in the clear. 

 

Not ideal, but a possible stop-gap option. 

Hi @ORhopeless 

Do you want that if the Label is visible the Label will not block the TextInput?

I’ve made a similar test as follows:

Set the Label’s Visible: If(IsNumeric(TextInput2.Text),true,false) S

et the Textinput: bring to front.

As the Textinput is front, the Label’s visible will not effect the TextInput.test423.jpg

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ORhopeless
Frequent Visitor

The issue was that with the text input brought to front, it would cover the label. So even with visable=true, it would be behind the text input box. This made me realize that it can be resolved by simply setting the text input box to transparent, placing the label behind it, and then a 3rd box behind them both with the fill/color to achieve the same visual effect.  Thanks all!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,931)