modifiable dialog button labels?




Hi all,

I am trying to code some reusable GtkDialogs (i.e., create them only once,
then hide and reuse them later as necessary rather than destroying and 
recreating every time). I need numerous dialogs which ask a simple question
and then have two buttons for the user to choose between, e.g.,

        Favorite drink? Wine/Beer
        Which way? North/South

(Poor examples maybe, but you get the idea.) Seems like a waste to create
a bunch of different dialogs that are all using the same basic structure,
I would prefer to just create one and then modify its elements as needed.

I can see how to change a text label inserted into the dialog's content area
to alter my question text, but so far have discovered no way to alter the
text labels used in the buttons which I supply at creation time to
gtk_dialog_new_with_buttons(). Seems like this ought to be an easy thing
to do, but I can see no way to retrieve any pointer to the dialog's button
objects nor any way to explicitly set their labels after the dialog
has been created. Any ideas?  

Thanks!

Roger Davis



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