Friday, May 28, 2021

Removing a gnocl::application toplevel.

The gnocl::application command is a really use option to create a project ready front end. It creates all the necessary basics, containers, menubars, toolbars and status zones -- it even packs the whole lot into a toplevel window and returns the widget-ids of the contents.


But what, as I recently needed, must be done when the application is the centre of a plug-in to be packed into some pre-existing container held in some other toplevel window?
 

Remove and repack!
 

The whole layout is contained in a frame, a widget ordinarily accessed. This needs to be removed from the default toplevel and repacked elsewhere. 


Here's how to do it.

array set app [gnocl::application]   
$app(topLevel) remove $app(frame)   
$app(topLevel) delete
unset app(topLevel)


No comments: