From: Axel S. <Axe...@in...> - 2010-02-15 12:00:55
|
Hi Lakshmi, On 15.02.2010, at 06:54, Lakshmi Narasimhan wrote: > Hello > I am trying to capture the signal when a user clicks on the > dropdown button (v) and selects a different entry. I found that the > signal to be used is changed but I could not find out a way to use it. > > I did try the onChanged signal (I believe this is the old way of > using signals), but this gets called when the user starts typing a > character and gets called for each character the user types. > > Can someone provide an example of using the changed signal? This is the only signal Gtk+ provides to track changes in the ComboBox. If I understand correctly, you disagree that typing a character is a change of the entry in the ComboBox. If you really need to stop the 'changed' signal from being emitted when the user types, you could try to connect to the focus-in and focus-out signals of the Widget. You connect to the changed signal as usual and retain the signal id. You then block this signal whenever the ComboBoxEntry widget gains the input focus and you unblock this signal id when the widget looses the input focus. Then your 'changed' handler should only be emitted when something "final" is in the entry. Hope this helps, Axel. > Thanks in advance. > -- > Regards > Lakshmi Narasimhan T V > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev_______________________________________________ > Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users |