GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Oct 31, 2014 2:18 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: no_window GtkEntry widget
PostPosted: Mon Feb 06, 2012 8:44 pm 
Offline

Joined: Mon Feb 06, 2012 8:17 pm
Posts: 4
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group