Hi, I have a Wx::TextCtrl that contains a series of words. Its contents are wrapped if too long. I want it to always show two lines of text, and a scrollbar if there's more than two lines to show.
Piece of cake? Yes, except that I cannot find the right value for the height of the TextCtrl. I tried something like this: my $sz = 24; $self->{tc_message}->SetFont(Wx::Font->new($sz, wxDEFAULT, wxNORMAL, wxNORMAL, 0, "")); my $scale = 3.6; $self->{tc_message}->SetMinSize(Wx::Size->new(-1,$scale*$sz)); $self->{tc_message}->SetSize(Wx::Size->new(-1, $scale*$sz)); The scale value of 3.6 gives acceptable results on both Linux GTK and Windows. But I think there's should be a better, more correct way. Any ideas? (Yes, I looked at using dialog points but that didn't seem to help.) -- Johan