HyperWorks Tools

hwtk::inputdialog

hwtk::inputdialog

Previous topic Next topic No expanding text in this topic  

hwtk::inputdialog

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME

hwtk::inputdialog - Dialog that asks for a value.

 

DESCRIPTION

A hwtk::inputdialog implements a dialog to ask user for a value. It displays a label and/or image, and an editor based on input type. Will return the value when OK is pressed.

 

SYNOPSIS

hwtk::inputdialog - pathName ?option value? ...

 

STANDARD OPTIONS

-clientdata, clientData, ClientData

-cursor, cursor, Cursor

-height, height, Height

-width, width, Width

 

WIDGET-SPECIFIC OPTIONS

 

Command-Line Name: -initialvalue

Database Name: initialValue

Database Class: InitialValue

This is the initial value assigned to the editor. The default is an empty string.

 

Command-Line Name: -inputtype

Database Name: inputType

Database Class: InputType

May be set to one of str uint int real combobox intcheck boolcheck intcolor rgbcolor fileopen filesave. This option sets the editor to be used to process user value. The default is str.

 

Command-Line Name: -valuelistcommand

Database Name: valueListCommand

Database Class: ValueListCommand

Specifies the script that should return the list of values to display in the drop-down listbox when -inputtype is set to combobox. Default is empty string.

 

 

WIDGET COMMAND

The widget is a singleton and its instance is not directly visible by the user. hwtk::inputdialog command will configure and post the dialog instance, hold by the framework. Does not support the standard widget commands like configure, cget.

 

EXAMPLES

 

Simple dialog on Windows:

hwtk::inputdialog -title "Input Dialog"

 

Note: Command will return only when dialog is unposted.

 

Use an image and set **-inputtype** to **combobox":

proc retValues {args} {return [list "item a" "item b" "item c"]}

 

::hwtk::inputdialog -title "Input Dialog" /

  -image add-24.png -text "Choose the items to add:" /

  -inputtype combobox -valuelistcommand retValues