Hi all,
Here's a style shortcut package to complement
wxPerl::Constructors
http://scratchcomputing.com/svn/wxPerl-Styles/trunk/
I realize that style('hscroll', te =>
'process_enter|multiline') isn't
much shorter than (style =>
Wx::wxHSCROLL()|Wx::wxTE_PROCESS_ENTER()|
Wx::wxTE_MULTILINE()), but shortness is only an interim
goal. By
processing the constants as strings, I'm hoping to enable a
better
XRC-like thing. In the meantime, it's shorter enough that I
think I
can get all of the style onto one line more often than not.
Thoughts?
This is copied from the documentation. See the svn above.
use Wx qw(
ALIGN_RIGHT
);
... wxALIGN_RIGHT ... ;
Becomes:
use Wx ();
use wxPerl::Styles 'wxVal';
... wxVal('align_right') ... ;
use Wx ();
use wxPerl::Constructors;
use wxPerl::Styles 'style';
...
my $text_ctrl = wxPerl::TextCtrl->new($self, 'some text
here',
style('hscroll', te => 'process_enter|multiline')
);
Thanks,
Eric
--
Hot dogs: just another condiment.
--Heart-attack Man
---------------------------------------------------
http://scratchcomputing.c
om
---------------------------------------------------
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxperl-users mailing list
wxperl-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxperl-use
rs
|