Form Refresher

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form Refresher

    Sup!?
    Running PC-DMIS 2013 MR1 Online
    -----------------------------------------------
    So guys I've got this super-cool form going on. I can't remember if/how i can get my keyboard to interact with it.
    For example, I've got a spinner that increments a number by ±1 depending on if you hit the up or down arrow. I was hoping to have the keyboard up/down arrows control that too?


    I think I could figure out a way to hack it together, but if there's essentially a toggle or something I can put in that would be better.

    EDIT:
    I'm looking for something that allows a keyboard to control a form. It doesn't necessarily matter how many keys need to be pressed (It doesn't matter if I can hit "J", "Shift+J", "Ctrl+Alt+Shift+J" etc. as long as I can adjust some of the values without a mouse.
    Currently I can continue the form by pressing enter, but I'm pretty sure that's because the PC-DMIS "Play" button (or execute or whatever) works with enter, not necessarily the form (at least I didn't see anything directly in my "Execute" button that has to do with the Enter key...)

    I would have tried to play with it by now but I'm currently working an important job.

    This question is not suuuper important, but if I can find out how to change variables/interact with a form via keyboard shortcuts I can do a lot with that...
    Last edited by InspectorJester; 04-17-2018, 11:26 AM.

  • #2
    AFAIK it can't be done with the form function in PCDMIS but it can be done with VB so maybe that would be where to look? Sorry it ain't much of an answer mate but it's a starting point
    Clearance is clearance.

    Comment


    • InspectorJester
      InspectorJester commented
      Editing a comment
      I haven't played with it but I'm imagining so as well. Which would be fine, AFAIK the form editor pretty much operates on VBS :P

  • #3
    Normally, the objects (textbox, combobox, listbox, etc.) must have focus before the arrow keys can interact with them. When they have focus, you should be able to use the arrow keys to increase/decrease the values. You can move between the objects (switch focus) by tabbing. If this is possible with the form is unknown to me, but is possible with the dialogs created in the dialog editor in the basic script editor.
    PC-DMIS CAD++ 2o19 R1 SP4

    Comment


    • InspectorJester
      InspectorJester commented
      Editing a comment
      You are able to use tab to switch between objects in a form, and control a spinner via arrow keys if it is selected

  • #4
    At least in 2018 R1, if the spinner or the associated edit box has focus, up/down arrow will affect the value as expected. What more do you want?
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • #5
      I know I had problems setting focus (codewise) in the dialog editor - I never got the SetFocus command to work, or I didn't do it right.
      If possible, set the focus to the spinner (through code) after your form has been displayed, then you should be able to control the values with the arrow keys.
      PC-DMIS CAD++ 2o19 R1 SP4

      Comment


      • #6
        These replies are helpful; I will try some things out and see what I can work with. The spinner was my main concern, and that's essentially all I need.
        I was hoping for (ultimately not expecting) a more versatile method that would allow me to change other objects as well (such as a set of radio buttons)

        Comment


        • InspectorJester
          InspectorJester commented
          Editing a comment
          The arrow keys do work, however

      Related Topics

      Collapse

      Working...
      X