Re: confused about keyboard focus



On Fri, 2005-12-30 at 15:11 -0500, Travis J.I. Corcoran wrote:

      $entry2->has_focus(TRUE); # <---- IMPORTANT LINE

has_focus just tells the entry that it's supposed to have focus now and
should thus draw the blinking cursor, etc. that you see.  Here are three
ways that work:

  Glib::Idle->add (sub { $entry2->grab_focus; 0; });
  Glib::Idle->add (sub { $window->set_focus ($entry2); 0; });
  $vbox->set_focus_child ($entry2);

-- 
Bye,
-Torsten




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