DADiSP Worksheet Functions > Function Categories > Menu Functions > MENUDELETE

 

MENUDELETE

Purpose:

Deletes a modeless dialog box.

Syntax:

MENUDELETE(handle)

handle

-

An integer. The handle of the modeless dialog box to delete.

Example:

Consider test2.pan, a modeless, embedded dialog box:

 

// test2.pan

@panel

 

// modeless and embedded into Worksheet

@child 1

@modeless 1

 

// allow width to adjust

@adjust_width 1

 

// upper left device coords 10 pixels from Worksheet border

@xd 10

@yd 10

 

// default parameters

{defvar("_funcstr", "Gsin")}

{defvar("_funclen", 100)}

{defvar("_funcdx", 0.01)}

 

// dialog box input controls

Function: <w=20>~_funcstr = "<{_funcstr}>" ~<Gsin><Grand><Gnorm>

Length:   <w=20>~_funclen = <{_funclen}> ~input(2)

Deltax:   <w=20>~_funcdx  = <{_funcdx}> ~input(1)

 

// evaluate function and set current window formula

~eval(sprintf("W0 := %s(%d, %g)", _funcstr, _funclen, _funcdx))

 

// prevent automatic close

~menureturn

 

The following statements invoke the dialog box and automatically adjust the Worksheet location:

 

m = menufile("test2.pan");setwsx(getmenucoords(m)+10, -1);

 

 

 

Now, to remove the dialog box and restore the worksheet coordinates:

 

menudelete(m);setwsx(-1, -1)

Remarks:

MENUDELETE can be abbreviated MENUDEL.

 

MENUDELETE also removes modeless dialog boxes.

See Also:

MENUCLEAR

MENUFILE

MENUPRINT

MENUSHOW