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

a couple of newbie questions



Hello

I'm in the very early learning phase and I have a couple questions:

1) While using the clist widget how can I trap when the user clicks <enter>. I
am trapping the mouse clicks with:

  gtk_signal_connect( GTK_OBJECT(clist), "button_press_event",
		      GTK_SIGNAL_FUNC(button_selection_made), NULL);

but it doesn't seem to know if the enter button was pressed.

2) I'm setting the focus on the clist and I would like to know how
I can trap when the user presses the <down arrow>  I can use the arrow to scroll
down the list, and there is a black outline over the box that I stop on but I'm
not sure how to trap that.

3) I'm using the file selection widget and it's working well for me, but I'm
not sure how to trap when the user clicks <OK> before entering anything into
the text box. The tutorial shows how to grab the text from the box and that
works well:

    GtkFileSelection *fs;
    char                  *file_name;

    file_name = g_malloc(512);
    file_name = g_strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));


but I'm a bit confused on how to proceed with the error checking.

Thanks,

Mike



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