none
ControlsButton to slow RRS feed

  • Question

  • I wrote a sample program with 3 number inputs and 1 text input. All number adding in a result. The result is freshing by input.

    One control button "Next/Return/Enter" are all time showing. One control " End " is only showing by input text.

    The Enter or Return key ended the input. You can also set the cursor in a input field. You can using the Tab key for changing input fields. You can clicking the button "Next/Return/Enter" to change the input field.

    The problem is that not all click on a button has a reaction. I set at many places a Program.Delay but the button reaction is some times not ok.

    Show program PFD143 and please help me.


    Best Regards Martin

    Tuesday, June 18, 2013 6:48 AM

Answers

  • Modified test version KBH835-0.

    Added the 20ms delays suggested before in each repeating loop to give UI thread time to react.

    • Marked as answer by martmen Thursday, June 20, 2013 11:27 AM
    Wednesday, June 19, 2013 6:48 PM
    Moderator

All replies

  • Can't reproduce - not sure what we are looking for - perhaps a simple example?

    I would only recommend one Program.Delay of about 20ms in each continuous loop - enough to give the interface time to update all redraws etc.

    Tuesday, June 18, 2013 7:15 PM
    Moderator
  • LitDev,

    I think what Martin is saying is that on the button that he is using for (Next/Return/Enter) that it is missing click events.  If you run the program and just use that button it should go from textwindow1 to 2 to 3 to 4 each time you click the button.  If you watch it you'll see that for some reason it looks like it is dropping the click events (focus doesn't change to the next text window).  I looked at the code and don't see a reason for it, but that is what it is doing.


    JR

    Tuesday, June 18, 2013 10:57 PM
    Answerer
  • Martin,

    In the Managefokus routine comment out  the line "LDFocus.SetFocus(TextBox[InputIndex])".  Then run your program.  You should then be able to keep hitting the (Next/Return/Enter) button and focus in the textboxes will sequence through as they  should.  There was a conflict with the Managefokus routine and the checkbutton routine.  Disabling the above line allows it to work.


    JR


    Wednesday, June 19, 2013 12:07 AM
    Answerer
  • New version is KBH835.

    There was some bugs. But the problem is that the program don't reaction by click on the Button "Next/Return/Enter" or to press the key "Return" or key "Enter" after keyup.


    Best Regards Martin

    Wednesday, June 19, 2013 4:22 PM
  • Modified test version KBH835-0.

    Added the 20ms delays suggested before in each repeating loop to give UI thread time to react.

    • Marked as answer by martmen Thursday, June 20, 2013 11:27 AM
    Wednesday, June 19, 2013 6:48 PM
    Moderator