Re: Closing (and destroying) windows.



>Hi Colin,
>
>> I have an application with a number of windows. Each window is retained all
>> the time, and "shown" via clicking a button. The window is then "hidden" by
>> clicking a button on that window. All very simply.
>>
>> Each Gtk window is created in its own CDE window, which just happens to have
>> an in-built "close" function. If the user selects this, then the Gtk window
>> is not just hidden, but destroyed. The upshot of this is that I can not 
>re-show
>> the window.
>
>you can connect to the delete-event on that window, call gtk_widget_hide from 
>the
>handler and return TRUE. If you don't catch the event or return FALSE from the
>handler, the widget-destroy signal follows by default, which is not what you 
>want.
>
>Regards,
>
>Carsten
>


Hi,

Thanks Carsten for your reply. I have tried it out and it works okay.. BUT
if the window happens to be iconised, and you try to "close" the icon, the 
window just locks up now. :-(

Is there a separate event for deleting a window thru its icon, verses being
open ??

Any thoughts ??


best regards

/colin.


 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Colin Thomas. 
| Design Consultant.                             
|                                           
| Email   : colin designresources co uk     
| Tele    : (44) 1234 240562 
| Fax     : (44) 1234 241262               
|                                           
| Address : Design Resources,
|           Old Cock Inn,    
|           Silver End,         
|           Olney,                           
|           Buckinghamshire,                
|           United Kingdom.                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




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