Forum: wxRuby number input type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fabio P. (Guest)
on 2008-10-03 14:12
(Received via mailing list)
Hi all,
is there any option to limit input type (wxTextCtrl) to accept only
number?

thanks,

regards.

bio.
Alex F. (Guest)
on 2008-10-03 14:24
(Received via mailing list)
hi

Fabio P. wrote:
> is there any option to limit input type (wxTextCtrl) to accept only
> number?

    tx = Wx::TextCtrl.new(self)
    tx.validator = Wx::TextValidator.new(Wx::FILTER_NUMERIC)

cheers
alex
Fabio P. (Guest)
on 2008-10-03 15:26
(Received via mailing list)
Too fast!!

thank you Alex. :)

bio.
This topic is locked and can not be replied to.