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.
89f9acdcbc663e41e45ce590cd746d6e?d=identicon&s=25 Fabio Petrucci (Guest)
on 2008-10-03 12:12
(Received via mailing list)
Hi all,
is there any option to limit input type (wxTextCtrl) to accept only
number?

thanks,

regards.

bio.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2008-10-03 12:24
(Received via mailing list)
hi

Fabio Petrucci 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
89f9acdcbc663e41e45ce590cd746d6e?d=identicon&s=25 Fabio Petrucci (Guest)
on 2008-10-03 13:26
(Received via mailing list)
Too fast!!

thank you Alex. :)

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