TABLE OF CONTENTS
Widgets/OptionMenu [ Packages ]
[ Top ] [ Widgets ] [ Packages ]
FUNCTION
Provides code for manipulate Tk widget OptionMenu
SOURCE
package Tcl.Tk.Ada.Widgets.OptionMenu with SPARK_Mode is pragma Elaborate_Body;
OptionMenu/OptionMenu.Tk_OptionMenu [ Types ]
[ Top ] [ OptionMenu ] [ 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 Tk_OptionMenu is new Tk_Widget with private;
OptionMenu/OptionMenu.Create_(function) [ Subprograms ]
[ Top ] [ OptionMenu ] [ Subprograms ]
FUNCTION
Creates a new Tk_OptionMenu in the specified interpreter.
SOURCE
overriding function Create (pathName, options: in String; Interp: in Tcl_Interp := Null_Interp) return Tk_OptionMenu with Global => null;
PARAMETERS
pathName - Tk path (starts with dot) for the widget options - Options which will be passed to the widget. Must be at least Global variable name in which selected menu will be stored and at least one menu value 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 Tk_OptionMenu
EXAMPLE
-- Create a new optionmenu with pathname .mymenu and options One Two Three and variable myvar My_Option_Menu: constant Tk_OptionMenu := Create(".mymenu", "myvar One Two Three");
SEE ALSO
OptionMenu.Create_(procedure)
COMMANDS
tk_optionMenu pathName options
HISTORY
8.6.2 - Added
OptionMenu/OptionMenu.Create_(procedure) [ Subprograms ]
[ Top ] [ OptionMenu ] [ Subprograms ]
FUNCTION
Creates a new Tk_OptionMenu in the specified interpreter.
SOURCE
overriding procedure Create (Widgt: out Tk_OptionMenu; pathName, options: in String; Interp: in Tcl_Interp := Null_Interp) with Global => null;
PARAMETERS
Widgt - Tk_OptionMenu which will be created pathName - Tk path (starts with dot) for the widget options - Options which will be passed to the widget. Must be at least Global variable name in which selected menu will be stored and at least one menu value 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 Tk_OptionMenu as parameter Widgt
EXAMPLE
-- Create optionmenu My_Menu with pathname .mymenu and options One Two Three and variable myvar on the current Tcl interpreter declare My_Menu: Tk_OptionMenu; begin Create(My_Menu, ".mymenu", "myvar One Two Three"); end;
SEE ALSO
OptionMenu.Create_(function)
COMMANDS
tk_optionMenu pathName options
HISTORY
8.6.2 - Added
OptionMenu/OptionMenu.Get_Widget [ Subprograms ]
[ Top ] [ OptionMenu ] [ Subprograms ]
FUNCTION
Get the existing Tk_OptionMenu widget
SOURCE
overriding function Get_Widget (pathName: in String; Interp: in Tcl_Interp := Get_Context) return Tk_OptionMenu 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 Tk_OptionMenu widget
EXAMPLE
-- Get option menu widget with name .mymenu on the current Tcl interpreter My_Menu: constant Tk_OptionMenu := Get_Widget(".mymenu");
HISTORY
8.6.9 - Added