Hi.
I would like a GtkEntry widget to have no window, so as to remove the background and use parent window background. This is the default behavior for GtkLabel widgets for example (see
http://www.lanedo.com/~carlos/gtk3-doc/chap-drawing-model.html#figure-windowed-label), but can we do this for GtkEntry widgets?
I tried with
Code:
$entry->set_has_window(0);
in the following perl code, but this removes the widget drawing entirely...
Code:
#! /usr/bin/perl
use Gtk2 -init;
my $dialog = Gtk2::Dialog->new ('Message', undef,
'destroy-with-parent',
'gtk-ok' => 'none');
my $label = Gtk2::Label->new ('Label text with no window: background of main window');
$dialog->get_content_area ()->add ($label);
my $entry = Gtk2::Entry->new();
$entry->set_text('Entry text, remove white background?');
$entry->set_has_window(0);
$dialog->get_content_area ()->add ($entry);
$dialog->show_all;
$dialog->signal_connect (response => sub { $_[0]->destroy });
$dialog->run;
Please suggest me ideas to work with (perl or other languages).
Thanks,
Jojo.