I'm creating an app using wxperl and would like to use scalars to define my styles which are constants. For instance if creating a TextCtrl the code would look something like this:
Wx::TextCtrl->new( $self, -1, "", [5, 10], [-1, -1], wxTE_MULTILINE );
I'm unable to use a scalar in place of
wxTE_MULTILINE
I've tried the following:
use vars qw($constantstring);
my $style = 'wxTE_MULTILINE';
*constantstring=\"$style";
Wx::TextCtrl->new( $self, -1, "", [5, 10], [-1, -1], $style );
Is this even possible? If so what am I doing wrong?
Thanks