取消
显示结果 
搜索替代 
您的意思是: 

On-screen keyboard

已解决!
转到解答

I want to develop a custom on screen keyboard for my LabVIEW application which is going to be running on a touchscreen. Is there any easy way of linking this to the text inputs of standard labview front panel objects- file requesters, text boxes etc- without creating my own special controls for each one?

0 项奖励
1 条消息(共 6 条)
4,590 次查看

Have you considered using the Windows built-in On-Screen Keyboard ?

I used it for my touch screen project.

 

George Zou
2 条消息(共 6 条)
4,586 次查看

Hey thanks George. It is one idea I am considering, but ideally I would like to create something myself in LV to better fit in with my app and use screen space to maximum effect.

0 项奖励
3 条消息(共 6 条)
4,576 次查看

Just in case you don't know, you can resize the MS version of OSK.

I did.  So I can have move screen space.

 

 

George Zou
4 条消息(共 6 条)
4,514 次查看
解答
已被主题作者 ToeCutter 接受

Hello ToeCutter,

 

I second the idea of using the OS's on-screen keyboard, but if you do want to create your own you should be able to use Find Control with Key Focus method to insert text into whichever string control is currently selected:

 

LabVIEW Help: Find Control with Key Focus Method

http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/vi_find_control_with_key_focus/

 

You'll still want to pre-screen the returned references to ensure that a valid control has been selected in case the user selects something else with the keyboard open.

 

This is assuming you want some sort of non-modal floating or docked keyboard, if you want a pop-up on click keyboard monitoring mouse down events on string terminals and launching a keyboard linked to that control could also work, but it seems clunkier.

 

Regards,

Tom L.
5 条消息(共 6 条)
4,496 次查看

Thanks, Tom.

 

What you mention is largely what I have already developed since my last post and it all does work quite nicely, however the method to get the control with current focus was not one I was aware of- this will allow me to simplify my code quite a bit!

 

My only conundrum now is if there's a way to make the keyboard panel not steal control focus- if this is possible I can create an on screen keyboard for use with applications other than LabVIEW which would be a bonus!

0 项奖励
6 条消息(共 6 条)
4,477 次查看