Jump to content
Sign in to follow this  
Thang Nguyen

Problem with update value of the controls on control panel

Recommended Posts

Hi,

I have an issue with control panel which I still cannot find a reasonable way to solve it. I have two number controls which allow user to input value. These controls can only be updated when after inputting the value you click somewhere else or click on "OK" button. The issue is after inputting the value, user will hit enter key, then the last nummeric control will not be updated. If you have experience with this please tell me how to solve this problem.

Thank you so much,

Thang Nguyen

Share this post


Link to post
Share on other sites

I remember having this problem before. What is happening is when the user presses enter the new value in the string control is not updated before the event is triggered that the OK button has changed value. The easy solution is to right click the string control and enable "Update Value While Typing" Of course this could have a bad side effect if you are triggering events on the changing string control, but it doesn't sound like you are.

EDIT: sorry you said you were using a numeric control, in that case I don't know what to do. I've played with it for a few minutes and it does seem odd.

I setup the same example you mentioned, a numeric control, then an event for changing value of the ok button, then tied the return key to the toggle. After that I made a wait for 1 second, then read the value from the control and put it into an indicator but the value didn't update.

Share this post


Link to post
Share on other sites

I guess your solution is a good way to solve this problem. I can use two string controls then convert their value to number. As I understand, the value is only updated when there is another mouse click event.

Share this post


Link to post
Share on other sites

QUOTE (Thang Nguyen @ Feb 10 2009, 03:34 PM)

Hi,

I have an issue with control panel which I still cannot find a reasonable way to solve it. I have two number controls which allow user to input value. These controls can only be updated when after inputting the value you click somewhere else or click on "OK" button. The issue is after inputting the value, user will hit enter key, then the last nummeric control will not be updated. If you have experience with this please tell me how to solve this problem.

Thank you so much,

Thang Nguyen

One option that may help is to check off "Set to focus on toggle" in the Key Navigation properties for whichever button is bound to Enter.

If you are using an event structure, read the numeric values in the event case for the OK button. Or, create a timeout case with the timeout wired to a shift register. Start with that shift register set to -1. In the event case for the OK button, set the timeout shift register to 0. All pending events will execute (for example, value change events on your numeric controls), then the timeout will occur. Put your code from the OK button event into that timeout case.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.