Re: Focus in callback for text entry.



Deekshit Mantampady <deekshit mantampady Wipro com> writes: 
 I was using GtkEntry widget. I am facing the following queries....

1.  I have written a callback for "focus in" event. But this
callback is getting called only when the widgets are navigated using
the "TAB" key.  When I clicked inside the entry(when there was no
focus), the callback is not getting called. I think the mose click
on that widget should also get called(because the focus is still on
that object). Can anybody please reply, whether it is the intended
behaviour so something else.

Yes, you should get focus_in_event if a mouse click triggers the
focus, AFAIK.

2. I need a gadget which accepts  only numbers. So can I customise the
entry gadget or I have to write the callbacks accordingly...

You have to connect to "insert_text" on the entry and filter out 
other characters. I think there's an example somewhere, either in the
reference or FAQ or tutorial, I don't remember.

Havoc



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