From: Mattia B. <mb...@ds...> - 2002-11-22 18:43:07
|
On Thu, 21 Nov 2002 21:35:26 -0800 (PST) DH <cra...@ya...> wrote: > Hello. > I'm a writing/designing an app. > What's available for saving font settings? > Can I use XRC to do this? I have absolutely no idea if XRC can do this (ask wx-users). However, if you are using wxWindows 2.3.x, you can use Wx::Font::GetNativeFontInfoDesc and ::SetNativeFontInfo. > To let the user choose font/color, I dooos a > > my $fD = Wx::FontDialog->new( $frame, Wx::FontData->new() ); > > if( $fD->ShowModal() == wxID_OK ) { > $fD = $fD->GetFontData(); > my $c = $fD->GetColour(); > my $f = $fD->GetChosenFont(); > > ## serialize $c and $f here > ## by hand? ( there's gotta be something written already to do this ) > > } HTH Mattia |