# bug in destroy?
xtAppInitialize -class Program

xmForm .form managed
xmPushButton .form.pb managed \
    -labelString Pushme \
    -leftAttachment attach_form \
    -topAttachment attach_form

xmLabel .form.label managed \
    -leftAttachment attach_form \
    -topAttachment attach_widget \
    -topWidget .form.pb

.form.label destroyCallback {puts stdout destroyed}
.form.pb activateCallback {.form.label destroyWidget}

. realizeWidget

. mainLoop
