Author Topic: NumericControl doesn't respond to Up/Down arrow keys  (Read 1486 times)

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
NumericControl doesn't respond to Up/Down arrow keys
« on: 2017 March 15 14:16:34 »
I've written a PCL process that uses a NumericControl (i.e. combined slider/edit/label) but I've found that the slider doesn't respond to Keyboard up/down arrows nor to PgUp/PgDn.  But a bare Slider control responds just fine.

It appears to be a more general problem because the NumericControls in the BackgroundNeutralization and ColorCalibration processes don't respond to the keyboard either.  However the Slider controls (StdDev) in the Convolution process do respond even though NumericControls (shape, aspect ratio, rotation) do not.

I'm using Ripley on Windows 7.

Mark
« Last Edit: 2017 March 15 14:31:35 by sharkmelley »
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: NumericControl doesn't respond to Up/Down arrow keys
« Reply #1 on: 2017 March 16 02:43:15 »
Hi Mark,

Yes, this is a limitation of the current NumericEdit/NumericControl implementation. It happens because the edit member of NumericControl steals the keyboard focus of its parent control. I'll add OnKeyPress event handlers to these classes as necessary to solve this issue. The fix will be available on the GitHub repositories real soon, since I am right now completing a new major PCL version, ready for the incoming version 1.8.5 of PixInsight.

What process BTW?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: NumericControl doesn't respond to Up/Down arrow keys
« Reply #2 on: 2017 March 16 12:37:07 »
Your explanation makes sense - thanks.

Meanwhile I've re-written it using separate Slider and NumericEdit controls.

The process is an Asinh stretch - some info here: https://www.cloudynights.com/topic/569440-pixinsight-arcsinh-stretch/?p=7757514

I'm currently incorporating feedback gained on CloudyNights and I'm happy to add the code to the repository once it's a bit more stable.

Mark
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: NumericControl doesn't respond to Up/Down arrow keys
« Reply #3 on: 2017 March 16 13:13:07 »
Very nice! I am always glad to see new development projects. This is the main purpose of the entire PixInsight project, in fact: it is really a development platform, not just an application (if only more people, especially users, would realize and value this...).

Are you a member of our GitHub team? If you wish, let me know your GitHub member name and I'll add you. At any rate, let me know when you are ready to make a pull request with your code.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: NumericControl doesn't respond to Up/Down arrow keys
« Reply #4 on: 2017 March 16 13:46:15 »
Hi Juan,

I'm not yet a member of the GitHub team but if you can add me that would be great - give me a member name of sharkmelley.

I'll let you know when I'm ready with the code for this module.

The accessibility to write PJSR scripts and PCL modules is the unique feature of PixInsight and it's something I value very highly.

Mark

Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/