On Fri, 20 Sep 2013 00:07:11 GMT, det wrote:

i tried using getParent(), getToplevel() or getAncestor(GType ?) to get a reference to the host Dialog but i failed miserably. if i had this reference your suggestion is probably the way to go. so can the reference to the host dialog be retrieved from e.g. an Entry or Box at all? how? (where do i find the GType used in gtkD for Dialog, will this do the trick with getAncestor()?)

oh, i have overlooked (not the first time) that i have to cast the returned Widget to Dialog first, this seems to work:

assert( dlg is cast(Dialog)q.getToplevel() );
( cast(Dialog)q.getToplevel() ).getWidgetForResponse(ResponseType.ACCEPT).setSensitive(true);

with appropiate casting i got even a version using getAncestor(...) and gobject.Type.fromName() working, using:

assert( dlg is cast(Dialog)q.getAncestor( Type.fromName("GtkDialog") ) );
( cast(Dialog)q.getAncestor( Type.fromName("GtkDialog") ) ).getWidgetForResponse(ResponseType.ACCEPT).setSensitive(true);

despite being more verbose this is probably better as i can verify that my widget lives in a Dialog widget. it seems a bit inconsistent, though, that i have to use "GtkDialog" instead of "Dialog".

so this way my widget finds its host Dialog and doesn't need a reference. now i can experiment a bit more with your suggestions, mike, thanks again for your very useful help.