Re: [gtk-list] using accelerator keys - how?
- From: raster redhat com
- To: maestrox Geocities com
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] using accelerator keys - how?
- Date: Fri, 20 Mar 1998 16:38:20 -0500 (EST)
On 20 Mar, Nathan Froyd shouted:
-> Could somebody fill me in on how the accelerator key stuff works in
-> GTK+? For example, how would I implement the key press '1' to toggle a
-> check box? Or a key press of C-g to increment a scrollbar by 16?
->
-> Thanks!
-> Nathan
->
edit_accel=gtk_accelerator_table_new();
gtk_window_add_accelerator_table(GTK_WINDOW(window_edit),edit_accel);
gtk_accelerator_table_install(image_accel,
GTK_OBJECT(window_image),"delete_event",
'q',0);
that makes the q key delete the wwindow :)
(window_image is a GtkWindow)
you may wish to change "delete_event" to "clicked" (for the signal to
send to that widget).
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com /\___ /\ ___/||\___ ____/|/\___ raster@redhat.com
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]