I've just started learning about GTK and I've run into something which I cant seem to figure out. I have two buttons (find_node & cancel_process) in an hbox, which appear after a selection from my program menu) and I would like the cancel_process button to destroy only the hbox (not the entire program), if it is 'clicked'.

The thing is, only the process_cancel button is being removed, and I want them both (i.e. the entire hbox) to be destroyed.

Well, the function is gtk_widget_destroy() that you should add to your callback. However, are you going to be recreating these widgets multiple times? If so, maybe you should just connect the hbox to gtk_widget_hide_all().

Well, the function is gtk_widget_destroy() that you should add to your callback. However, are you going to be recreating these widgets multiple times? If so, maybe you should just connect the hbox to gtk_widget_hide_all().

Ah..so my problem was a typo...oops. And no, these will be a one off creation.

I have another question though...I have a list of parameters which I need to be able to individually edit their initialised values. I was hoping to do this with gtk_entry_new.

I am developing my code in the Maemo environment (for running on a Nokia N700) and I have a vbox full of gtk_entry widgets, filled in with their initialised values. Whenever I click on one of the entry boxes the little virtual keyboard of the Nokia pops up. My question is, what signal is triggered whenever I select the entry box to edit the value?

Or more to the point, at what stage could I insert the new parameter value from the entry widget to its allocated variable?

I think I found a way of updating the entry through the "changed' signal (because its editable)...maybe not the best way but at the moment it works, but this has led to another problem.

I have a data structure (GtkNetSettings) which holds a few parameters of type char*. I use this struct to populate a window where I can see how these parameters are set. I also use the struct in a window where I want to edit the values of the parameters (using gtk_entry, like I mentioned). However, after getting the updated value from the gtk_entry and setting the value in the struct, when I go back to view it I get the following error:

Who is online

Users browsing this forum: Google [Bot] and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum