Re: clearing the entry selected color [SOLVED]



On Wed, 20 Dec 2006 09:59:04 -0500
zentara <zentara1 sbcglobal net> wrote:

Well, I found that the entry text will NOT get highllighted
as long as you add it after the entry has visibility.

#!/usr/bin/perl
use warnings;
use strict;
use Gtk2 -init;

my $window = new Gtk2::Window;
$window->signal_connect (delete_event => sub { Gtk2->main_quit }); 

my $entry = Gtk2::Entry->new();
# bad
# $entry->set_text('[   ].[   ].[   ].[   ]');
# $entry->set_position(1);

$window->add($entry);
$window->set_focus_child($entry);  
$window->show_all;

#good
$entry->set_text('[   ].[   ].[   ].[   ]');
$entry->set_position(1);

Gtk2->main;

-- 
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]