Virtual Key Board


Recommended Posts

hi,

I am planning to use DAQfactory in a panel PC. For this i need to do some changes to my existing programs currently using with desktop PC with keyboard and mouse. Below are my requirements and please guide me to achieve those

  1. I need to make a new virtual key board which should appear when clicked on any editbox or a text input. when i press buttons in the virtual key board those should be entered to the relevant editbox or the text input.
  2. i need to arrange hardware key board keys to operate screen components. Its like if i press character A in the hardware key board, the action in the button 'START' should be functioned.
  3. I need to customize the locations (pixels - X and Y)of the popup screens appeared when triggered.

Please let me know the possibility to achieve above requirement and if so please help me to do those.

 

Best Regards,

 

Thushara

Link to comment
Share on other sites

1) use the system.onscreenkeyboard to enable the on screen keyboard.  See section 5.27 in the user's guide for more detail.

2) use either Speed Keys, available for many components, or use the various keyboard system events like OnChar and OnKeyDown described in 5.28.

3) When using popupModal() or popupModeless() for a page you can optionally specify the location and size of the popup.

Link to comment
Share on other sites

  • 2 weeks later...

hi,

thanks for the reply.

1.In fact i need only the numbers in the keyboard. But in the virtual keyboard all the buttons are there. So please let me know the way to make a new virtual keyboard including the numbers with erase, enter etc... to open with edit boxes or text inputs. 

 

Thanks in Advance,

 

Thushara

Link to comment
Share on other sites

You'd have to create your own keyboard using a Page and popping it up from script.  The keys on the page would then add / remove text from an edit box.  If you have Standard or higher you can use the key images in the symbol library.  If not you'll have to import your own.

Link to comment
Share on other sites

  • 2 months later...

Hi,

I'm getting more questions due to my lack of the knowledge on these area. So please solve me the belows

1. I'm unable to make the keyboard as I don't know how to assign numbers to the buttons to write to the edit both when pressed.

2. How can I popup the page only when touching a editbox or a text input. I'm unable to make the script.

3. Additionally please let me know how to make a page password system using the same own keyboard.

Thanks

Thushara

Link to comment
Share on other sites

  • 4 weeks later...

1) You'll need to use a Quick Sequence action in each of the buttons and have it modify the strContents variable.  For example:

 

component.myEditbox.strContents += "A"

 

The editbox itself should be in the popup.  Its much harder to create a modeless popup that edits an edit box on a main page, and truthfully you really don't want editboxes on main pages for reasons I explain here:

 

http://www.azeotech.com/board/index.php?/topic/3233-edit-boxes-in-hmi-software/

 

2) you can't.  You should use a variable value component to display the current value, not an edit box (for the reasons I just linked to), and either create an action for the value component that displays the popup, or a button adjacent.  Typically you'd also create a global string variable that contains the name of the variable you want set when the popup is closed (or they click a "Set" button you create).  Then you'd use script like:

 

execute(myVariable + " = " + component.myEditBox.strContents)

 

for a number, or:

 

execute(myVariable + " = '" + component.myEditBox.strContents + "'")

 
for a string
 

3) this would work the same way, except you'd use a password edit box component instead of a regular edit box, and instead of actually modifying a variable somewhere, you'd verify it against the correct password and either change the page or display an alert.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.