Help with focus/activation problems



I posted a message a couple days ago, but no answer so I'm going to post
again with some additional info that may help.

I have a window in which are several widgets, such as GtkEntry and
GtkTextView, and GtkTreeView (list store). When I run my program, it
seems that while I can click around and type text in the text entries
and text views, or select items in the TreeView, the widgets never seem
to become "active", ie: the cursor does not blink in the text entries
and selecting a row in the TreeView is the inactive color.

If I right-click in the text view, or select an item from my
GtkOptionMenu (of which no code exists for that callback, it's just
empty right now) suddenly the widgets seem to become "active", ie: the
text cursor blinks in the text entries and text views, selecting a row
in the GtkTreeView appears in the active highlight color.

I'm not sure what gives with this, or how to fix it. My CreateWindow
routine calls gtk_widget_grab_focus at the very end, but it seems to no
avail.

I've poored through the example code for Gtk 2 and don't see too much
with active routines or focus routines (except for the focus example)
when it comes to making widgets active in their windows. I don't
understand what is going on but I shouldn't have to cause some other
event to occur to make my window "activate".

I've set "Can Focus", "visible", and "sensitive" in Glade for all
widgets (that make sense) but it will not be active no matter what I try
(clicking buttons, different selections in different trees, typing text,
etc) until I select an item from my option menu or right-click in the
text view.

Any help is appreciated.

-- 
 .''`.      Carl B. Constantine
: :' :     duckwing duckwing ca
`. `'    GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom



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