faking a spin control

Hi,

I would like to have a control that implements spin
control functionality based on catching the events
(up, down, keys, etc.) rather than accept the
filtering done by the wxSpinCtrl (limiting you to
integers). I would like to be able to generate it
dynamically and treat it like a regular control (put
it into a sizer) to be dealt with like the regular
spin control, too.

Is there a simple way to do this with existing
wxPython components? I've been trying with the
TextCtrl and the SpinButton, but haven't had much
luck.

Thanks.

-Bert Boehmler

···

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Attached is something I wrote quite a while back. It seems to work but
I haven't actually used it for anything so all the bugs are yours <wink>

Regards,

FloatSpin.py (5.08 KB)

···

On Thu, 2003-08-21 at 22:20, Albert Boehmler wrote:

Hi,

I would like to have a control that implements spin
control functionality based on catching the events
(up, down, keys, etc.) rather than accept the
filtering done by the wxSpinCtrl (limiting you to
integers). I would like to be able to generate it
dynamically and treat it like a regular control (put
it into a sizer) to be dealt with like the regular
spin control, too.

Is there a simple way to do this with existing
wxPython components? I've been trying with the
TextCtrl and the SpinButton, but haven't had much
luck.

--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555

In the attached file, the line

EVT_COMMAND_DIMENSION = wxNewId()

is probably unecessary as it's never used <wink>.

Cut & paste errors are your friend.

···

On Fri, 2003-08-22 at 14:13, Cliff Wells wrote:

--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555