RE: [gtk-list] scrolled_window fails to show horizontal scrollba
- From: Evan Lawrence <evan worldpath net>
- To: gtk-list redhat com
- Subject: RE: [gtk-list] scrolled_window fails to show horizontal scrollba
- Date: Mon, 22 Feb 1999 19:12:22 -0500 (EST)
The current text widget doesn't support horizontal scrolling, so this behavior
makes perfect sense. Just another reason why the text widget needs to be / is
being rewritten :)
On 21-Feb-99 Hrvoje Niksic wrote:
> I tried to use the new 1.1 feature that GtkText objects automatically
> become scrollable when placed in a GtkScrolledWindow container -- and,
> indeed, for vertical scrollbars, it works as advertised. However, no
> matter what I do, I cannot get the horizontal scrollbar to work.
>
> Specifically, with the default policy, the horizontal scrollbar is
> always there, but it doesn't do anything. With the "AUTOMATIC"
> policy, the horizontal scrollbar is never shown. I set line wrap to
> false, so the scrollbar should appear. This is gtk+-1.1.16.
>
> I wonder if this is a bug or I'm doing something wrong. Here is a
> test program that fails to work as expected:
>
>#include <gtk/gtk.h>
>
> int
> main (int argc, char **argv)
> {
> GtkWidget *window;
> GtkWidget *scrolled;
> GtkWidget *text;
>
> gtk_init (&argc, &argv);
>
> window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>
> scrolled = gtk_scrolled_window_new (NULL, NULL);
> gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
> GTK_POLICY_AUTOMATIC,
> GTK_POLICY_AUTOMATIC);
> gtk_container_add (GTK_CONTAINER (window), scrolled);
>
> text = gtk_text_new (NULL, NULL);
> gtk_text_set_editable (GTK_TEXT (text), 1);
> gtk_text_set_line_wrap (GTK_TEXT (text), 0);
> gtk_container_add (GTK_CONTAINER (scrolled), text);
>
> gtk_widget_show_all (window);
>
> gtk_main ();
> return 0;
> }
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
--
Evan Lawrence
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]