> hello
>
> i need to know if a wxListItem has a bold font or not. i thought this would be
> easy to get with:
> print "bold\n" if($listCtrl->GetItem($i)->GetFont->GetWeight == wxBOLD);
>
> but this crashes perl (win98, wxPerl0.10)
It appears there is no way to get the font of an item. You could try asking this
on wx-users.
Regards
Mattia
> i was really confused and tried this:
>
> > my $item = Wx::ListItem->new;
> > my $font = Wx::Font->new(8, wxDEFAULT, wxNORMAL, wxBOLD);
> > $item->SetFont($font);
> > print $font->GetWeight . " -> " . $item->GetFont->GetWeight . "\n";
>
> $font->GetWeight works here.
The problem is that ->GetItem does not retrieve any font, hence
the font returned by ->GetFont is not valid.
|