CharlesB Posted March 16, 2006 Report Share Posted March 16, 2006 Hello, I have dialog with a multi-line string control, and a button allows to validate the dialog. This button is linked to the enter key. But this way, the user cannot put multiple lines, because if he hits "enter", the button is fired and the dialog closes! :headbang: Is there a way to bypass this? like deactivate the "enter" shortcut while the user enters text in the control? I tried but didn't find how. Thanks for your help! Quote Link to comment
Louis Manfredi Posted March 16, 2006 Report Share Posted March 16, 2006 Hi Charles: Are you using the Prompt user for input express vi? If so, open it up, (right click>Open front Panel) right click on the OK button>Properties>Key Navigation tab> Under the "toggle" pulldown, it probably says "Return" select "none" Work your way back, save the express vi (You'll be converting it to a regular vi, need to give it a name.-- See the documentation for Express Vi's for details if you need them.) Should solve your problem (if I understand what the problem is ). Best Regards, Louis Quote Link to comment
crelf Posted March 16, 2006 Report Share Posted March 16, 2006 Is there a way to bypass this? like deactivate the "enter" shortcut while the user enters text in the control? Since you only want the enter key navigation disabled while the user is typing in the string control, use an event structe to detect when the use is typing in the control (key focus), and then set the key navigation of the button to nothing. Then, when the string control looses key focus (another event in your event structure), set the key navigation of the Boolean back to its original state. Quote Link to comment
malef Posted March 16, 2006 Report Share Posted March 16, 2006 Since you only want the enter key navigation disabled while the user is typing in the string control, use an event structe to detect when the use is typing in the control (key focus), and then set the key navigation of the button to nothing. Then, when the string control looses key focus (another event in your event structure), set the key navigation of the Boolean back to its original state. or disable End text entry with Enter key in front panel options page. Manfred Quote Link to comment
CharlesB Posted March 16, 2006 Author Report Share Posted March 16, 2006 Since you only want the enter key navigation disabled while the user is typing in the string control, use an event structe to detect when the use is typing in the control (key focus), and then set the key navigation of the button to nothing. Then, when the string control looses key focus (another event in your event structure), set the key navigation of the Boolean back to its original state. Thanks :thumbup: , that's what I wanted to do, but I couldn't find out how to change the key navigation of a button at runtime... Now I found However I don't find the event that tells me that the control has lost the focus? Thank for your help Hi Charles:Are you using the Prompt user for input express vi? If so, open it up, (right click>Open front Panel) right click on the OK button>Properties>Key Navigation tab> Under the "toggle" pulldown, it probably says "Return" select "none" Work your way back, save the express vi (You'll be converting it to a regular vi, need to give it a name.-- See the documentation for Express Vi's for details if you need them.) Should solve your problem (if I understand what the problem is ). Best Regards, Louis Hi Louis, This is not ideal for me, because I still want to fire the OK button when the user hits the enter key while not having the focus in the control Thank you anyway Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.