hm_exitpanel

Exits from a custom Tk panel.

Syntax

hm_exitpanel

Type

HyperMesh Tcl GUI Command

Description

The hm_framework command contains an option to create a custom Tk panel in the panel area. This panel must contain a button that calls hm_exitpanel to remove the panel and restore the previous panel.

Example

This example creates a panel that counts the number of elements in the mode and displays it on the panel. The return button on the panel will call hm_exitpanel.

hm_createmark elems 1 advanced all;
set count [hm_marklength elems 1];
hm_markclear elems 1;

set f .summary
frame $f
set top [frame $f.top];
pack $top -side top;
set bottom [frame $f.bottom];
pack $bottom -side bottom -fill x -expand 0;

label $top.label -text "Count of elements in model: $count";
pack $top.label
button $bottom.button -text "return" -command hm_exitpanel -bg #C06060;
pack $bottom.button -side right -anchor e;

hm_framework addpanel $f "Model Info";
hm_framework drawpanel $f;

Errors

None.