Re: setting border width



2009/1/5 Dafna Hirschfeld <dafna3 gmail com>:
I couldn't find how to set a border of a widget. I don't mean the space
around the widget but the border line itself.
The entry widget and the check-button come with a border line by default
(the entry widget even have a little shadow).
But the TextView  has no border by default , How can I add a border?
I fond the function paint_shadow of Style, and a struct GtkBorder but I
couldn't understand if this is what I need and how to use it.

You can add the TextView into a Gtk2::ScrolledWindow and then set the
shadow type:

sub wrap_in_scrolls {
        my ($widget) = @_;

        my $scrolls = Gtk2::ScrolledWindow->new(undef, undef);
        $scrolls->set_policy('automatic', 'always');
        $scrolls->set_shadow_type('out');
        $scrolls->add($widget);

        return $scrolls;
}

You can see the different types of shadows available in the GTK
documentation page:
http://library.gnome.org/devel/gtk/stable/gtk-Standard-Enumerations.html#GtkShadowType



_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list





-- 
Emmanuel Rodriguez



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