Re: Gtk2::Entry with Pango markup

2009-01-20 Thread Torsten Schoenfeld
Emmanuel Rodriguez wrote: I tried using a Gtk2::TextView but I didn't find out how to give the text view the exact height of one line (just as a Gtk2::Entry). Gtk2::TextView is a Gtk2::Widget, so you can set its dimensions with set_size_request(). For finding the height of one line, look at

Re: Gtk2::Entry with Pango markup

2009-01-20 Thread Kevin Ryde
Torsten Schoenfeld kaffeeti...@gmx.de writes: Or cheat and ask another Gtk2::Entry for its height via get_size_request(). 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

Re: Gtk2::Entry with Pango markup

2009-01-20 Thread Emmanuel Rodriguez
On Tue, Jan 20, 2009 at 11:08 PM, Kevin Ryde use...@zip.com.au wrote: Torsten Schoenfeld kaffeeti...@gmx.de writes: Or cheat and ask another Gtk2::Entry for its height via get_size_request(). Stick one line in the TextView and ask it how big it wants to be :-). ($widget-size_request is the

Re: Gtk2::Entry with Pango markup

2008-11-26 Thread Kevin Ryde
Emmanuel Rodriguez [EMAIL PROTECTED] writes: # Escape the XML entities - MUST be done before applying the Pango markup $text =~ s/([])/$ENTITIES{$1}/eg; Glib::Markup::escape_text() might do that. (A well-hidden func :-) ___

Gtk2::Entry with Pango markup

2008-11-25 Thread Emmanuel Rodriguez
Hi, I'm have Gtk2::Entry where users are expected to enter an XPath expression. I would like to let the user know when an expression isn't valid. I thought of using Pango markup but it seems very hard to do with a Gtk2::Entry. For the moment I can use a callback to 'changed' and set the markup

Re: Gtk2::Entry with Pango markup

2008-11-25 Thread zentara
On Tue, 25 Nov 2008 12:47:43 +0100 Emmanuel Rodriguez [EMAIL PROTECTED] wrote: Hi, I'm have Gtk2::Entry where users are expected to enter an XPath expression. I would like to let the user know when an expression isn't valid. I thought of using Pango markup but it seems very hard to do with a

Re: Gtk2::Entry with Pango markup

2008-11-25 Thread Emmanuel Rodriguez
to a Gtk2::Entry =head1 DESCRIPTION This sample program shows how to apply Pango markup to a Gtk2::Entry. This particular example considers ASCII letters as being the only valid characters, any other character will be underlined in red but still accepted by the widget. =cut use strict; use warnings