Is this what you want to do? Just create as many font objects as you want
with a different variable name and add them with the -font attribute to any
control.
Thanks,
Phil Larson
==========================================
use Win32::GUI;
$Font = new Win32::GUI::Font(
-name => "Courier New",
-height => 16,
);
$Window = new Win32::GUI::Window(
-name => "Window",
-text => "Font Test",
-width => 120,
-height => 65,
-left => 100,
-top => 100,
-font => $Font,
);
$Textbox = $Window->AddRichEdit(
-name => "Text",
-text => "Hello",
-left => 5,
-top => 10,
-width => 100,
-height => 25,
-font => $font,
);
$Window->Show();
Win32::GUI::Dialog();
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Sundar Raman
> Sent: Wednesday, March 03, 1999 12:40 PM
> To: [EMAIL PROTECTED]
> Subject: [perl-win32-gui] fontfaces in controls
>
>
>
>
> i'm trying to change the face of the font in a listbox control in
> order for it
> to be a fixed width font so that i can display some data
> "properly". i've tried
> $lstBox->ChooseFont(), which brings up the font choice box, but
> then what do i
> trap for the font name and size and stuff? i see SetFont() and
> GetFont(), but
> i'm not sure what they return or set.
>
> i tried $lstList->SetFont($lstList->ChooseFont());
>
> but this seems to always set the font face to system, bold!
>
> thanks in advance.
>
>
>