TABLE OF CONTENTS
Widgets/TtkMenuButton [ Packages ]
[ Top ] [ Widgets ] [ Packages ]
FUNCTION
Provides code for manipulate Tk widget Ttk:menubutton
SOURCE
package Tcl.Tk.Ada.Widgets.TtkMenuButton with SPARK_Mode is pragma Elaborate_Body;
TtkMenuButton/TtkMenuButton.Ttk_MenuButton [ Types ]
[ Top ] [ TtkMenuButton ] [ 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_MenuButton is new Tk_Widget with private;
TtkMenuButton/TtkMenuButton.Create_(function) [ Subprograms ]
[ Top ] [ TtkMenuButton ] [ Subprograms ]
FUNCTION
Creates a new Ttk_MenuButton in the specified interpreter.
SOURCE
overriding function Create (pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) return Ttk_MenuButton 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_MenuButton
EXAMPLE
-- Create a new menubutton with pathname .mymenubutton and menu .mymenu My_Menu_Button: constant Ttk_MenuButton := Create(".mymenubutton", "-menu .mymenu");
SEE ALSO
TtkMenuButton.Create_(procedure)
COMMANDS
ttk::menubutton pathName ?options?
HISTORY
8.6.1 - Added
TtkMenuButton/TtkMenuButton.Create_(procedure) [ Subprograms ]
[ Top ] [ TtkMenuButton ] [ Subprograms ]
FUNCTION
Creates a new Ttk_MenuButton in the specified interpreter.
SOURCE
overriding procedure Create (Widgt: out Ttk_MenuButton; pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) with Global => null;
PARAMETERS
Widgt - Ttk_MenuButton 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_MenuButton as parameter Widgt
EXAMPLE
-- Create menubutton My_Menu_Button with pathname .mymenubutton and label click me on the current Tcl interpreter declare My_Menu_Button: Ttk_MenuButton; begin Create(My_Menu_Button, ".mymenubutton", "-text {click me}"); end;
SEE ALSO
TtkMenuButton.Create_(function)
COMMANDS
ttk::menubutton pathName ?options?
HISTORY
8.6.1 - Added
TtkMenuButton/TtkMenuButton.Get_Widget [ Subprograms ]
[ Top ] [ TtkMenuButton ] [ Subprograms ]
FUNCTION
Get the existing Ttk_MenuButton widget
SOURCE
overriding function Get_Widget (pathName: in String; Interp: in Tcl_Interp := Get_Context) return Ttk_MenuButton 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_MenuButton widget
EXAMPLE
-- Get button widget with name .mybutton on the current Tcl interpreter My_Button: constant Ttk_MenuButton := Get_Widget(".mybutton");
HISTORY
8.6.9 - Added