TABLE OF CONTENTS


Widgets/TtkWidget [ Packages ]

[ Top ] [ Widgets ] [ Packages ]

FUNCTION

 Provides code for manipulate Ttk widgets

SOURCE

package Tcl.Tk.Ada.Widgets.TtkWidget with
   SPARK_Mode
is

TtkWidget/TtkWidget.Identify_Element [ Subprograms ]

[ Top ] [ TtkWidget ] [ Subprograms ]

FUNCTION

 Get the name of the element at the selected coordinate

SOURCE

   function Identify_Element
     (Widget: in Tk_Widget'Class; X, Y: in String) return String with
      Pre => X /= "" and Y /= "";

PARAMETERS

 Widget - Ttk widget which will be queried for the elements
 X      - X coordinate to check relative to the Widget
 Y      - Y coordinate to check relative to the Widget

RESULT

 The name of the element at the selected point or {} if no element was
 found

EXAMPLE

   -- Get the name of the element at point (25, 87) in My_Widget widget
   Element_Name: constant String := Identify_Element(My_Widget, "25", "87");

COMMANDS

 Widget identify element x y

HISTORY

 8.6.6 - Added

TtkWidget/TtkWidget.InState [ Subprograms ]

[ Top ] [ TtkWidget ] [ Subprograms ]

FUNCTION

 Check if the selected Ttk widget is in the selected state

SOURCE

   function InState
     (Widget: in Tk_Widget'Class; StateSpec: in String;
      Script: in String := "") return String with
      Pre => StateSpec /= "";

PARAMETERS

 Widget    - Ttk widget which will be queried for state
 StateSpec - Ttk state to check
 Script    - If Widget is in the selected StateSpec, run this Tcl script

RESULT

 1 if the selected widget is in the selected state, otherwise 0.

EXAMPLE

      -- Check if widget My_Widget is disabled
      Is_Disabled: constant String := InState(My_Widget, "disabled");

COMMANDS

 Widget instate statespec ?script?

HISTORY

 8.6.3 - Added

TtkWidget/TtkWidget.State_(function) [ Subprograms ]

[ Top ] [ TtkWidget ] [ Subprograms ]

FUNCTION

 Get the current state of the selected widget

SOURCE

   function State(Widget: in Tk_Widget'Class) return String;

PARAMETERS

 Widget - Ttk widget which will be queried for the state

RESULT

 List of currently enabled state flags

EXAMPLE

      -- Get the current state of My_Widget widget
      Current_State: constant String := State(My_Widget);

SEE ALSO

 TtkWidget.State_(procedure)

COMMANDS

 Widget state

HISTORY

 8.6.3 - Added

TtkWidget/TtkWidget.State_(procedure) [ Subprograms ]

[ Top ] [ TtkWidget ] [ Subprograms ]

FUNCTION

 Set the selected widget to the new state

SOURCE

   procedure State(Widget: in Tk_Widget'Class; StateSpec: in String) with
      Pre => StateSpec /= "";

PARAMETERS

 Widget    - Ttk widget which state will be set
 StateSpec - Ttk state to set

EXAMPLE

      -- Reenable My_Widget
      State(My_Widget, "!disabled");

SEE ALSO

 TtkWidget.State_(function)

COMMANDS

 Widget state stateSpec

HISTORY

 8.6.3 - Added