focus in dialogs



I have a few simple dialog boxes that each have an entry (wrapped in a
hbox) on top, and some buttons in the action area.  When the dialog is
displayed the entry should have input focus, but I can't figure out
how to do that.  I tried set_focus_child() first directly on the entry
from the dialog constructor, then I realized the entry is not a direct
child of the dialog so I do something like

dialog->set_focus_child(hbox);
hbox->set_focus_child(entry);

but nothing seems to work.

Help?  gtk+1.2, gtkmm.  Answer in terms of plain C gtk will be
helpful, too, of course.

-- 
Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.



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