Re: solved: Textarea&focus
| From: | Markus Fischer | Date: | Fri, 01 Mar 2002 18:23:17 +0000 |
| Subject: | Re: solved: Textarea&focus | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1405@lists.php.net to get a copy of this message | ||
Btw, this question has little to do with PHP-GTK itself and
is best asked on the GTK+ list (which I recommend anyway to
read) :-)
On Fri, Mar 01, 2002 at 05:46:08PM +0100, Sebastian G. wrote :
> "Sebastian G." wrote:
> > [...]
> > does anyone has a fast explaining of how to make the GtkScrolledWindow always focus on
> > i.e. the last line of a GtkText-Widget?
>
> Solving:
>
> | $text_area = &new GtkText();
> | $text_area -> set_editable(false);
> | $scrolled_window = &GtkScrolledWindow
> | // Sets Horazontal (none) & vertical (if needed) scrolling
> | $scrolled_window -> set_policy(GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC);
> | $scrolled_window -> add_with_viewport($text_area);
> | $text_area -> freeze();
> | $text_area -> insert_text($message."\n", 0);
> | $text_area -> thaw();
> | $adjustment = &new GtkAdjustment(0, 0, 0, 1, 1, 4);
> | $scrolled_window -> set_vadjustment($adjustment);
> | while (Gtk::events_pending())
> | Gtk::main_iteration();
>
> I start to like these classes ;)->-
>
> --
> MfG, Sebastian G. : mailseppel@gmx.de : HH-germany :
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc