On 11/13/06, Mark Dootson <mark.dootson znix.com> wrote:
> Hi,
>
> I haven't got 0.22 to test on, but I'm fairly sure the
following worked
> on wxMSW
>
>
$alignment->SetFont(Wx::Font->new(12,wxMODERN,wxNORMAL
,wxNORMAL,0));
>
>
> Regards
>
> Mark
>
Wow. thanks for the quick reply.
Unfortunately, that didn't work either. the error was:
Usage: Wx::Font::newNativeInfo(CLASS, info) at guilibsrch.pl
line 720.
Tom
>
> Thomas Margraf wrote:
> > Hi,
> > this has been bothering me for a while now, and i
can't figure out
> > what's going wrong.
> >
> > I'm importing this:
> >
> > use Wx;
> > use Wx::Grid;
> > use base qw(Wx::Frame);
> > use Wx::Event qw(EVT_BUTTON EVT_GRID_SELECT_CELL);
> > use Wx qw( :all );
> >
> > I would like $alignment to use a fixed width font.
The commented lines
> > are from previous tries. I pasted them in to show
you what I've tried
> > already.
> >
> > $alignment = Wx::TextCtrl->new( $panel, -1,
"", [20, 470], [850, 200], 100);
> > # my $style = Wx::TextAttr->new();
> > # my $font =
$style->GetFont();#Wx::Font->new(12, wxMODERN);
> > # if ($font->SetFamily( wxMODERN )) {
> > # print "successn";
> > # }
> > # else {
> > # print "failn";
> > # }
> > # if( $style->SetFont($font)){
> > # print "font is modernn";
> > # }
> > $alignment->SetDefaultStyle(0, 2,
Wx::TextAttr->new(
> >
Wx::Font(wxModern)
> > )
> > );
> > # $alignment->SetFont( $font );
> >
> > This is the current error:
> >
> > Error while autoloading 'Wx::Font' at
guilibsrch.pl line 716
> >
> > I'm using version 0.22 on OS X. Is this problem
due to me not seeing
> > the obvious, or is this a bug that's been fixed in
more recent
> > versions?
> > Thanks for your help,
> > Tom
>
>
>
--
No discipline is ever requisite to force attendance upon
lectures
which are really worth the attending.
-- Adam Smith, "The Wealth of Nations"
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
wxperl-users mailing list
wxperl-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxperl-use
rs
|