Re: 3d image border



On Wed, 13 Dec 2006 17:43:24 +0700
beast <beast ldap or id> wrote:


I have an image and I would like it to have 3D border ( etched-in?).
Which widget suitable for this purpose?
Thanks.
--beast

Does this give you ideas?
#!/usr/bin/perl
use warnings;
use strict;
#################################################
# An example illustrating images and markup.
#################################################
use Gtk2 '-init';

my $window = Gtk2::Window->new;
my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file("bridget-1.jpg");
my $image  = Gtk2::Image->new_from_pixbuf($pixbuf);
my $button = Gtk2::Button->new();
my $vbox   = Gtk2::VBox->new();
my $label  = Gtk2::Label->new("Press this button!");
$vbox->pack_start( $label, 0, 0, 0 );
$vbox->pack_start( $image, 0, 0, 0 );
$window->set( border_width => 15 );
$button->add($vbox);    # <- You can pack any widget inside a button!
$window->add($button);

$button->signal_connect(
    clicked => sub {
        $label->set_markup(
            "<b>Thank " . "<span foreground=\"blue\">" . "you</span>!</b>" );
    }
);

$window->signal_connect('destroy', sub { Gtk2->main_quit });

$window->show_all();

Gtk2->main;
__END__


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



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