hwtk::inputdialog - Dialog that asks for a value.
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.
hwtk::inputdialog - pathName ?option value? ...
-clientdata, clientData, ClientData
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.
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.
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