[Glade-users] problem with GtkEntry




On Fri, 2008-01-11 at 21:23 +0800, dashikugua at 126.com wrote:
 
 
 
Sorry for my poor English:)
Do you mean that I can connect a callback to the signal
"key-press-event" of the GtkEntry and realize the function by writing
the corresponding program in the callback funtion?
Yes.
Does the GtkEntry not have a property which could be set to realize
the function?
No. You can also try to catch "insert-text" signal if "key-press-event"
somehow does not suite your needs. But in ideal case you should use
GtkSpinButton instead of GtkEntry to enter numbers. It filters out
everything but numbers. The only downside is that you have to specify
the range of values (however it could be an advantage too).


?2008-01-10?"Alexey Kurochkin" <alexey.kurochkin at pathfinderlwd.com>
???
        Connect a callback to a "key-press-event" and filter there everything
        outside GDK_0 to GDK_9 and GDK_KP_0 to GDK_KP_9
        
        On Thu, 2008-01-10 at 20:06 +0800, dashikugua wrote:
        >  
        > Hi all:
        >  
        > I need some information about the GtkEntry widget. I need the
        > GtkEntry on the GUI which I am designing to receive only the numeric
        > key of the keyboard, which means that when the GtkEntry is grabbing
        > the input focus and I press down the alphabetic key such as "A", the
        > Entry does not show the corresponding letter. But I do not konw how to
        > realize this function. Any information is appreciated.
        > Thanks:)
        >  
        >  
        > _______________________________________________
        > Glade-users maillist  -  Glade-users at lists.ximian.com
        > http://lists.ximian.com/mailman/listinfo/glade-users
        _______________________________________________
        Glade-users maillist  -  Glade-users at lists.ximian.com
        http://lists.ximian.com/mailman/listinfo/glade-users



______________________________________________________________________
? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? 2 ? ? 
_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users




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