in reply to Re^2: Tk Text -font=>segfault
in thread Tk Text -font=>segfault
This may or may not help you much, as I don't have Linux. But I've tried the code provided on my Mac running both 5.8.8 and 5.10, and neither seg faults. However, neither does what's expected, either. I'm guessing that if the user types in the text fields in the tabs, the text is supposed to render as 12 point Courier, and that doesn't seem to work for me (didn't on my Windows box running strawberry perl 5.10, either).
However, there's a workaround. Add use Tk::Font then change
foreach (keys %pg) {$txt{$_} = $pg{$_}->Text(-font=>"courier-12")->pack()}
to
foreach (keys %pg) {$txt{$_} = $pg{$_}->Text()->pack(); $pg{$_}->Font(family=>'courier',point=>12)}
and see if that gets you what you need.
|
|---|