‎07-28-2019 05:35 PM
Is there a way to disable the increment/decrement for numeric controls from the arrow keys? I have an array of scale factors that I don't want the arrow keys to increment/decrement the scale factor if the user tries to navigate with the up/down keys.
Solved! Go to Solution.
‎07-28-2019 06:16 PM
You could use a Key Down? event for the controls and discard the event if it happens to be an up or down arryw.
‎07-29-2019 01:52 AM
You may also hide the arrows: just open the control's context menu and uncheck Visible Items -> Increment/Decrement.
There's a Control property to do this programatically, too.
‎07-29-2019 08:22 AM
@pincpanter wrote:
You may also hide the arrows: just open the control's context menu and uncheck Visible Items -> Increment/Decrement.
That does not affect the keyboard arrow keys, which is what I think the OP is asking about. But I still disable the Increment/Decrement arrows in all of my UI.
‎07-29-2019 08:43 AM
@crossrulz ha scritto:
@pincpanter wrote:
You may also hide the arrows: just open the control's context menu and uncheck Visible Items -> Increment/Decrement.
That does not affect the keyboard arrow keys, which is what I think the OP is asking about. But I still disable the Increment/Decrement arrows in all of my UI.
You're right. I misinterpreted the OP request.
‎07-29-2019 08:53 AM
If you have an event case and check for Key Down you can at least set a flag to undo the next event, which will be the Change Value.
‎07-29-2019 08:56 AM - edited ‎07-29-2019 08:58 AM
‎07-29-2019 09:10 AM - edited ‎07-29-2019 09:12 AM
@GerdW wrote:
Hi Ramon,
no need to store a flag when you use a filter event (like "KeyDown?") and discard the event for "unwanted" keys:
This is what I was trying to accomplish but couldn't get it to work as intended without the discard filter. I hadn't filtered anything before so I didn't know the option was available. Thanks everyone for the help!!
‎07-29-2019 09:14 AM
Hi Gerd,
I forgot about that option, which is even better. However for me the "KeyDown?" event does not seem to be triggered on an array of numerics like the OP was asking for.
‎07-29-2019 10:02 AM - edited ‎07-29-2019 10:04 AM
@RamonG ha scritto:
Hi Gerd,
I forgot about that option, which is even better. However for me the "KeyDown?" event does not seem to be triggered on an array of numerics like the OP was asking for.
In case you have an array, you need to register the event with the Array Element reference: