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');

        return $scrolls;

You can see the different types of shadows available in the GTK
documentation page:

gtk-perl-list mailing list
gtk-perl-list gnome org

Emmanuel Rodriguez

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