Thanks. Your suggestion didn't exactly work, but this alternative did:
my $font = Wx::Font->new(10,wxFONTFAMILY_DEFAULT,
wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,0,"Courier");
$myTextCtrl->SetFont($font);
Yay!
On Tue, Aug 3, 2010 at 5:09 PM, Alessandro
<[email protected]> wrote:
> Hi,
> I use Wx::Font
>
> http://docs.wxwidgets.org/stable/wx_wxfont.html#wxfont
>
>
> and SetFont method inherited from Wx::Window
> It works for me setting 'courier'
>
>
> Example
>
> # Get current font
> my $font = $myTextCtrl->GetFont;
> # Set font
> if ( $font->SetFaceName('Courier') )
> {
> $myTextCtrl->SetFont($font);
> }
>
>
>
>
> 2010/8/3 Daniel Carrera <[email protected]>
>>
>> Hi,
>>
>> Is there a space to make Wx::TextCtrl use *monospace* font? This is
>> important to display source code and ASCII art for example. I've
>> looked here:
>>
>> http://docs.wxwidgets.org/stable/wx_wxtextctrl.html
>>
>> I don't see anything for "mono" :-( But I'm sure there is a solution.
>> I can't imagine that I am the first person in history who wants to
>> display source code with wx.
>>
>> Daniel.
>> --
>> Intolerant people should be shot.
>
>
--
Intolerant people should be shot.