TABLE OF CONTENTS
- 1. TtkEntry/TtkComboBox
- 1.1. TtkComboBox/TtkComboBox.Ttk_ComboBox
- 1.2. TtkComboBox/TtkComboBox.Create_(function)
- 1.3. TtkComboBox/TtkComboBox.Create_(procedure)
- 1.4. TtkComboBox/TtkComboBox.Current_(function)
- 1.5. TtkComboBox/TtkComboBox.Current_(procedure)
- 1.6. TtkComboBox/TtkComboBox.Get_Widget
- 1.7. TtkComboBox/TtkComboBox.Set
TtkEntry/TtkComboBox [ Packages ]
[ Top ] [ TtkEntry ] [ Packages ]
FUNCTION
Provides code for manipulate Tk widget ComboBox
SOURCE
package Tcl.Tk.Ada.Widgets.TtkEntry.TtkComboBox with SPARK_Mode is pragma Elaborate_Body;
TtkComboBox/TtkComboBox.Ttk_ComboBox [ Types ]
[ Top ] [ TtkComboBox ] [ Types ]
FUNCTION
This is a non-abstract type derived directly from Tk_Widget. Each of the derived widgets redefines the Create subprogram in order to create the correct type of widget.
SOURCE
type Ttk_ComboBox is new Ttk_Entry with private;
TtkComboBox/TtkComboBox.Create_(function) [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Creates a new Ttk_ComboBox in the specified interpreter.
SOURCE
function Create (pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) return Ttk_ComboBox with Global => null;
PARAMETERS
pathName - Tk path (starts with dot) for the widget options - Options which will be passed to the widget. Default value is empty Interp - Tcl interpreter to which the widget will be created. If null, the widget will be created in the "contextual" interpreter. Default value is null.
RESULT
Newly created Ttk_ComboBox
EXAMPLE
-- Create a new combobox with pathname .mycombobox and values yes and no My_Combobox: constant Ttk_ComboBox := Create(".mycombobox", "-values [list yes no]");
SEE ALSO
TtkComboBox.Create_(procedure)
COMMANDS
ttk::combobox pathName ?options?
HISTORY
8.6.2 - Added
TtkComboBox/TtkComboBox.Create_(procedure) [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Creates a new Ttk_ComboBox in the specified interpreter.
SOURCE
procedure Create (Widgt: out Ttk_ComboBox; pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) with Global => null;
PARAMETERS
Widgt - Ttk_ComboBox which will be created pathName - Tk path (starts with dot) for the widget options - Options which will be passed to the widget. Default value is empty Interp - Tcl interpreter to which the widget will be created. If null, the widget will be created in the "contextual" interpreter. Default value is null.
OUTPUT
Newly created Ttk_ComboBox as parameter Widgt
EXAMPLE
-- Create combobox My_Combobox with pathname .mycombobox and width 10 characters on the current Tcl interpreter declare My_Combobox: Ttk_ComboBox; begin Create(My_Combobox, ".mycombobox", "-width 10"); end;
SEE ALSO
TtkComboBox.Create_(function)
COMMANDS
ttk::combobox pathName ?options?
HISTORY
8.6.2 - Added
TtkComboBox/TtkComboBox.Current_(function) [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Get the current value of the selected Ttk_ComboBox
SOURCE
function Current(ComboBox: in Ttk_ComboBox) return String;
PARAMETERS
ComboBox - Ttk_ComboBox which the current value will be queried
RESULT
The current value of the ComboBox or "-1" if the value is not in the list of values for the ComboBox
EXAMPLE
-- Get the current value of My_Combobox combobox Value: constant String := Current(My_Combobox);
SEE ALSO
TtkComboBox.Current_(procedure)
COMMANDS
ComboBox current
HISTORY
8.6.5 - Added
TtkComboBox/TtkComboBox.Current_(procedure) [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Set the current value for the selected Ttk_ComboBox
SOURCE
procedure Current(ComboBox: in Ttk_ComboBox; NewIndex: in String) with Pre'Class => NewIndex /= "";
PARAMETERS
ComboBox - Ttk_ComboBox which the current value will be set NewIndex - A new index of the item from the list of values for the ComboBox which will be set as the current value
EXAMPLE
-- Set the current value of My_Combobox combobox to second value in list Current(My_Combobox, "1");
SEE ALSO
TtkComboBox.Current_(function), Set
COMMANDS
ComboBox current newIndex
HISTORY
8.6.5 - Added
TtkComboBox/TtkComboBox.Get_Widget [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Get the existing Ttk_ComboBox widget
SOURCE
overriding function Get_Widget (pathName: in String; Interp: in Tcl_Interp := Get_Context) return Ttk_ComboBox with Global => null;
PARAMETERS
pathName - Tk path (starts with dot) for the widget Interp - Tcl interpreter on which the widget exists. Can be empty. Default value is current Tcl interpreter
RESULT
Existing Ttk_ComboBox widget
EXAMPLE
-- Get combobox widget with name .mycombo on the current Tcl interpreter My_ComboBox: constant Ttk_ComboBox := Get_Widget(".mycombo");
HISTORY
8.6.9 - Added
TtkComboBox/TtkComboBox.Set [ Subprograms ]
[ Top ] [ TtkComboBox ] [ Subprograms ]
FUNCTION
Set the value of the selected Ttk_ComboBox
SOURCE
procedure Set(ComboBox: in Ttk_ComboBox; Value: in String);
PARAMETERS
ComboBox - Ttk_ComboBox which value will be set Value - A new value for the ComboBox
EXAMPLE
-- Set the value of My_Combobox to text my new value Set(My_Combobox, "{my new value}");
COMMANDS
ComboBox set value
HISTORY
8.6.5 - Added