6 Standard dialog boxes

QTk offers the following standard dialog boxes:

If the application runs on a Windows platform, the first 3 dialog boxes are the standard one from Windows.

6.1 Save and load dialog boxes

The save and load dialog boxes are spawned by:

{QTk.dialogbox save(defaultextension:DE


{QTk.dialogbox load(defaultextension:DE


Result={QTk.dialogbox load(defaultextension:"qdw" 
                           title:"Load QTkDrawing..." 
                           filetypes:q(q("QTkDraw files" q(".qdw"))
                                       q("All files" q("*"))) $)}

The parameters are:

6.2 Color dialog box

The color dialog box is spawned by:

{QTk.dialogbox color(initialcolor:IC


Result={QTk.dialogbox color(initialcolor:c(255 0 0)
                            title:"Select a color..." $)}

The parameters are:

6.3 Print Canvas dialog box

Canvases can be printed by their postscript method. The print canvas dialog box can be used to let the user interactively specify all the parameters of this method. To help the user correctly choose the area to print, a rough copy of the canvas is done inside the dialog box.

The print canvas dialog box is spawned by:

{QTk.dialogbox printcanvas(canvas:C


{{QTk.build td(canvas(glue:nswe handle:C))} show}
{C create(rectangle 10 10 100 100)}
Result={QTk.dialogbox printcanvas(canvas:C $)}
{C postscript(colormode:Result.colormode

The parameters are:

Donatien Grolaux
Version 1.3.0 (20040413)