From: Thomas M. <to...@gm...> - 2006-11-13 00:32:50
|
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 "success\n"; # } # else { # print "fail\n"; # } # if( $style->SetFont($font)){ # print "font is modern\n"; # } $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" |