It is currently Thu Sep 09, 2010 6:32 am




Post new topic Reply to topic  [ 2 posts ] 
 Non-editable input editable when using touchscreen - bug? 
Author Message
Trooper
Trooper

Joined: Wed Nov 26, 2008 8:18 am
Posts: 12
Post Non-editable input editable when using touchscreen - bug?
I have a numeric text field, which is enabled, but not editable. (I didn't want to disable it, because that greys it out and makes the text a bit more difficult to read.) When I'm in preview mode, I can put the cursor in the field, but I can't edit it. It's read only. When I'm in touchscreen mode and I put the cursor in the field, the touchscreen keyboard pops up and I can edit the field. That doesn't seem right to me. Is it the intended behavior.

I can probably work around this by replacing my component with a numeric label, but thought I'd report it anyway.


Wed Jul 22, 2009 12:35 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 2517
Location: Sacramento, CA
Post Re: Non-editable input editable when using touchscreen - bug?
Yeah, you're right, that isn't correct. We'll get it fixed, but in the meantime the workaround is simple:

Set the field's "Touchscreen Mode" (expert property) to "None", and then add the touchscreen logic yourself to the field's mousePressed event with something like this:

Code:
if fpmi.gui.isTouchscreenModeEnabled() and event.source.isEditable():
   event.source.intValue = fpmi.gui.showNumericKeypad(event.source.intValue)

_________________
Carl Gould
Software Development
Inductive Automation


Wed Jul 22, 2009 12:44 pm
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: