TABLE OF CONTENTS


TtkEntry/TtkSpinBox [ Packages ]

[ Top ] [ TtkEntry ] [ Packages ]

FUNCTION

 Provides code for manipulate Tk widget Ttk::SpinBox

SOURCE

package Tcl.Tk.Ada.Widgets.TtkEntry.TtkSpinBox with
   SPARK_Mode
is
   pragma Elaborate_Body;

TtkSpinBox/TtkSpinBox.Ttk_SpinBox [ Types ]

[ Top ] [ TtkSpinBox ] [ 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_SpinBox is new Ttk_Entry with private;

TtkSpinBox/TtkSpinBox.Create_(function) [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Creates a new Ttk_SpinBox in the specified interpreter.

SOURCE

   overriding function Create
     (pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) return Ttk_SpinBox 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_SpinBox

EXAMPLE

   -- Create a new spinbox with pathname .myspinbox with range from 1 to 100
   My_Spinbox: constant Ttk_SpinBox := Create(".myspinbox", "-from 1 -to 100");

SEE ALSO

 TtkSpinBox.Create_(procedure)

COMMANDS

 ttk::spinbox pathName ?options?

HISTORY

 8.6.2 - Added

TtkSpinBox/TtkSpinBox.Create_(procedure) [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Creates a new Ttk_SpinBox in the specified interpreter.

SOURCE

   overriding procedure Create
     (Widgt: out Ttk_SpinBox; pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) with
      Global => null;

PARAMETERS

 Widgt    - Ttk_SpinBox 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_SpinBox as parameter Widgt

EXAMPLE

     -- Create spinbox My_Spinbox with pathname .myspinbox which wraps values on the current Tcl interpreter
     declare
        My_Spinbox: Ttk_SpinBox;
     begin
        Create(My_Spinbox, ".myspinbox", "-wrap true");
     end;

SEE ALSO

 TtkSpinBox.Create_(function)

COMMANDS

 ttk::spinbox pathName ?options?

HISTORY

 8.6.2 - Added

TtkSpinBox/TtkSpinBox.Current_(function) [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Get the current value of the selected Ttk_SpinBox

SOURCE

   function Current(SpinBox: in Ttk_SpinBox) return String;

PARAMETERS

 SpinBox - Ttk_SpinBox which the current value will be queried

RESULT

 The current value of the SpinBox or "-1" if the value is not in the
 list of values for the SpinBox

EXAMPLE

      -- Get the current value of My_Spinbox spinbox
      Value: constant String := Current(My_Spinbox);

SEE ALSO

 TtkSpinBox.Current_(procedure)

COMMANDS

 SpinBox current

HISTORY

 8.6.6 - Added

TtkSpinBox/TtkSpinBox.Current_(procedure) [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Set the current value for the selected Ttk_SpinBox

SOURCE

   procedure Current(SpinBox: in Ttk_SpinBox; NewIndex: in String) with
      Pre'Class => NewIndex /= "";

PARAMETERS

 SpinBox  - Ttk_SpinBox which the current value will be set
 NewIndex - A new index of the item from the list of values for the
            SpinBox which will be set as the current value

EXAMPLE

   -- Set the current value of My_Spinbox spinbox to 1
   Current(My_Spinbox, "1");

SEE ALSO

 TtkSpinBox.Current_(function), Set

COMMANDS

 SpinBox current newIndex

HISTORY

 8.6.6 - Added

TtkSpinBox/TtkSpinBox.Get_Widget [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Get the existing Ttk_SpinBox widget

SOURCE

   overriding function Get_Widget
     (pathName: in String; Interp: in Tcl_Interp := Get_Context)
      return Ttk_SpinBox 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_SpinBox widget

EXAMPLE

     -- Get spinbox widget with name .myspin on the current Tcl interpreter
     My_SpinBox: constant Ttk_SpinBox := Get_Widget(".myspin");

HISTORY

 8.6.9 - Added

TtkSpinBox/TtkSpinBox.Set [ Subprograms ]

[ Top ] [ TtkSpinBox ] [ Subprograms ]

FUNCTION

 Set the value of the selected Ttk_SpinBox

SOURCE

   procedure Set(SpinBox: in Ttk_SpinBox; Value: in String);

PARAMETERS

 SpinBox - Ttk_SpinBox which value will be set
 Value   - A new value for the SpinBox

EXAMPLE

      -- Set the value of My_Spinbox to 2
      Set(My_Combobox, "2");

COMMANDS

 SpinBox set value

HISTORY

 8.6.6 - Added