On 07/02/2016 10:37 PM, Dechcaudron wrote:

Hello guys,

currently trying to set my first basic GUI for a program of mine. I have no trouble managing callbacks like addOnShow(...), but I haven't been able to find the gtkD how-to to hide a window when the user presses the close (X) button instead of deleting it.

Could someone help me out?

For windows you could set an on delete handler that hides the window,
return true so it stops processing other handlers, so the window doesn't
get destroyed anyway.

yourWindow.addOnDelete(bool delegate(Event e, Widget w) {
	w.hide();
	return true;
});