wxNumCtrl?

Pierre Hjälm wrote:

Will Sadkin writes:

Pierre Hjälm wrote:

I hope you are aware that the wxIntCtrl that ships with
2.4.0.2 is somewhat buggy. You can't enter negative
numbers in the "normal" way.
[...]

Funny, it works fine under MSW...

So, some questions:
- What platform are you using?

wxGTK, sorry I didn't mention that

- Exactly what key sequence did you type?
[...]

In the demo, I first selected the "Set minimum value" button, then
clicked on the number control next to it, then pressed backspace
(which selected the 0), then tried to enter '-','1','2','3'.
I tested it right now, and it actually refuses any more input after
the '-', not the '1' as I said before.

After I press '-', the control changes the value to '-1' with
just the '1' selected. It works if I then (somehow) deselect the '1',
but that can't be the way it's supposed to work.

This also works fine under MSW; the code is supposed to allow
the selected '1' to be replaced with your typed '1', resulting
in nothing selected, with the insertion point after the 1 and
more digits being perfectly ok. So I can only assume there must
be a platform-specific issue.

*Rats.*

I had assumed that the text control implementations were identical
at the level at which I am programming them. (Apparently not.)
Unfortunately, I don't a wxGTK machine at my disposal for testing,
so can I ask you to work with me "off-list" to resolve this?

Thanks in advance,
/Will Sadkin
Parlance Corporation

Will Sadkin wrote:

Pierre Hjälm wrote:

Will Sadkin writes:

Pierre Hjälm wrote:

I hope you are aware that the wxIntCtrl that ships with 2.4.0.2 is somewhat buggy. You can't enter negative numbers in the "normal" way.
[...]

Funny, it works fine under MSW...

So, some questions:
- What platform are you using?

wxGTK, sorry I didn't mention that

- Exactly what key sequence did you type?
[...]

In the demo, I first selected the "Set minimum value" button, then
clicked on the number control next to it, then pressed backspace
(which selected the 0), then tried to enter '-','1','2','3'.
I tested it right now, and it actually refuses any more input after
the '-', not the '1' as I said before.

After I press '-', the control changes the value to '-1' with
just the '1' selected. It works if I then (somehow) deselect the '1',
but that can't be the way it's supposed to work.

This also works fine under MSW; the code is supposed to allow the selected '1' to be replaced with your typed '1', resulting in nothing selected, with the insertion point after the 1 and more digits being perfectly ok. So I can only assume there must be a platform-specific issue.

*Rats.*

I had assumed that the text control implementations were identical
at the level at which I am programming them. (Apparently not.)
Unfortunately, I don't a wxGTK machine at my disposal for testing,
so can I ask you to work with me "off-list" to resolve this?

I haven't installed 2.4 yet, so I haven't taken a look at the problem. However, one difference which I know caused me problems when porting a specialized (EVT_CHAR filtered) wxTextCtrl from Windows to GTK was that under windows, SetSelection also sets the insertion point whereas under GTK you need SetSelection followed by SetInsertionPoint.

David