Wx::Perl::TextValidator(3pm)

Wx::Perl::TextValidator3pm

Perl replacement for wxtextvalidator

Usage

    my $storage = '';
    my $validator1 = Wx::Perl::TextValidator->new( '\d', \$storage );
    my $validator2 = Wx::Perl::TextValidator->new( '[abcdef]' );
    my $validator3 = Wx::Perl::TextValidator->new( qr/[a-zA-Z]/ );
    my $textctrl = Wx::TextCtrl->new( $parent, -1, "", $pos, $size, $style,
                                      $validator1 );

Overview

A "Wx::Validator" subclass that allows filtering user input to a "Wx::TextCtrl".

Methods

    my $validator1 = Wx::Perl::TextValidator->new( $regexp, \$storage );
    my $validator2 = Wx::Perl::TextValidator->new( $regexp );

Constructs a new "Wx::Perl::Validator". The first argument must be a regular expression matching a single-character string and is used to validate the field contents and user input. The second argument, if present, is used in TransferDataToWindow/TransferDataToWindow as the source/destination for the fields contents.

  The first argument can be a string as well as a reqular expression
object created using C<qr//>.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

From libwx-perl 1:0.9932-9+b2 in Debian 13 (Trixie). Parsed by carta from the page's man source.