[gtk-list] Lookup Question
- From: George Deprez <deprez seas smu edu>
- To: gtk-list redhat com
- Subject: [gtk-list] Lookup Question
- Date: Thu, 24 Feb 2000 22:21:26 -0600
Hello,
What do you do if lookup() doesn't find your widget?
I can see both my button and my list in the app window.
The callback should place a simple text string in the list.
Below is relavent info for the button and list setup, plus the callback.
Do I need a "lookup_sibling" type of function?
Thanks,
George
========================
void new_node_cb(GtkButton *was_clicked, gpointer udata){
GtkWidget *NodeList;
NodeList = lookup_widget ( GTK_WIDGET ( was_clicked ) , "Node_List");
. . .
}
========================
int main . . .
. . .
GtkWidget *Main_Window;
GtkWidget *NodeList;
GtkWidget *New_Node_Button;
. . .
Main_Window = gtk_window_new ( GTK_WINDOW_TOPLEVEL );
Node_List = gtk_list_new();
New_Node_Button = gtk_button_new_with_label( "New Node");
. . .
gtk_widget_set_name ( Node_List , "Node_List" );
. . .
gtk_table_attach( Main_Table <=== Node_List );
gtk_table_attach( Main_Table <=== New_Node_Button );
. . .
gtk_container_add ( Main_Window <=== Main_Table);
. . .
}
========================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]