Re: a Close button too many
[email protected] (Walter C. Pelissero) Wed, 11 Jul 2007 11:30:50 +0200
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "CH" == Chisheng Huang <[email protected]> writes: CH> "Walter C. Pelissero" <[email protected]> writes: >> Sorry if this is not a CLG specific question; it may just be >> that I'm not understanding GTK itself. >> >> I'm trying to write a yes/no dialog with this code: >> >> (let* ((response nil) (dialog (make-instance 'message-dialog >> :message-type :question :button '("gtk-yes" :yes) :button >> '("gtk-no" :no) :text message :signal (list 'response #'(lambda >> (dialog id) (setf response (dialog-find-response dialog id))) >> :object t)))) (dialog-run dialog) (widget-destroy dialog) (eq >> response :yes)) >> >> >> But contrary to my expectations I don't get two buttons but >> three. How do I get rid of the Close button? CH> If you really want to get rid of the close button, insert the CH> following right above (DIALOG-RUN DIALOG) : CH> (let ((hbox (dialog-action-area dialog))) (container-remove CH> hbox (find "gtk-close" (container-children hbox) :key CH> #'button-label :test #'string=))) CH> Or you can just implement a yes-or-no dialog based on the CH> vanilla gtk:dialog directly. I thought the Close button was something I could turn off with an argument. I used your example, instead. Thank you. -- walter pelissero http://www.pelissero.de ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/