cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Autoselect an invisible textbox

ague
13-Aquamarine

Autoselect an invisible textbox

I have a textbox that takes input from a scanner (I'm using a hand-held Android based scanner). The user can scan bar codes and then services are run in the background once a user scans something. The textbox auto-selects, so there is no need for the user to click anywhere - he can just continue to scan different bar codes again and again, etc etc. 

 

This is exactly the functionality I want, except I just want to make the textbox invisible. Once I change the 'visible' property on the textbox widget to be 'false', the textbox will no longer auto-select and all my functionality goes out the window. 

 

Anyone ever run into this?

ACCEPTED SOLUTION

Accepted Solutions
khayes1
15-Moonstone
(To:ague)

Would a simple workaround be to make the style properties of the textbox all set to none? (i.e background, foreground etc.) Not very elegant, but if all you are trying to do is hide the widget it would probably work.

 

alternatively you could place another widget on top of it via the z order?

View solution in original post

6 REPLIES 6
eliotlandrum
14-Alexandrite
(To:ague)

Do you need to stay with using a textbox because of the hand scanner?

ague
13-Aquamarine
(To:eliotlandrum)

It doesn't necessarily need to be a textbox - but my scanning application is automatically parsed as keyboard input. So I supposed I could use any widget that reads keyboard input......

eliotlandrum
14-Alexandrite
(To:ague)

Right, that makes sense. Would you be able to achieve the same functionality if you just made the box sized 1x1 and moved it to an inconspicuous location?

ague
13-Aquamarine
(To:eliotlandrum)

Good points on both counts.....I'll experiment with both and see where that gets me! 

khayes1
15-Moonstone
(To:ague)

Would a simple workaround be to make the style properties of the textbox all set to none? (i.e background, foreground etc.) Not very elegant, but if all you are trying to do is hide the widget it would probably work.

 

alternatively you could place another widget on top of it via the z order?

ague
13-Aquamarine
(To:khayes1)

Taking all the styling out of the widget so it's completely invisible, worked. I also changed the text box option to 'mask input' and that hid the floating cursor as well. 

 

I tried moving the box behind another widget, but with the 'advanced responsive' type mashup, this wasn't possible.

 

Thank you! 

Announcements


Top Tags