Re: Gtk2::Entry with Pango markup

On Tue, Jan 20, 2009 at 11:08 PM, Kevin Ryde <user42 zip com au> wrote:
Torsten Schoenfeld <kaffeetisch gmx de> writes:

Or cheat and ask another Gtk2::Entry for its height via

Stick one line in the TextView and ask it how big it wants to be :-).
($widget->size_request is the one to ask, I think.)

If it's for a dialog box I've had success forcing the size of
sub-widgets, then asking the dialog how big it would like to be, and
setting that size in as its $window->set_default_size (followed by
undoing the sub-widget forcing).  You can then still grow or shrink the
dialog, but the initial size is sensible.
Nice tricks.

I have modified the sample script that I've posted previously and made
it into a CPAN module (Gtk2::Ex::Entry::Pango). This module allows one
to use Pango for a Gtk2 entry widget.

Emmanuel Rodriguez

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]