TABLE OF CONTENTS


TkAda/TkGrid [ Packages ]

[ Top ] [ TkAda ] [ Packages ]

FUNCTION

 Provides code for manipulate Tk command Grid

SOURCE

package Tcl.Tk.Ada.Grid with
   SPARK_Mode
is

TkGrid/TkGrid.Column_Configure_(function) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get column configuration options for Slave widget in Master grid.

SOURCE

   function Column_Configure(Master, Slave: in Tk_Widget'Class) return String;

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Slave   - Tk_Widget inside Master

RESULT

 String with column configuration options for selected Slave widget

EXAMPLE

      -- Get the all column options for My_Frame grid and My_Entry widget
      Options: constant String := Column_Configure(My_Frame, My_Entry);

SEE ALSO

 TkGrid.Column_Configure_(procedure)

COMMANDS

 grid columnconfigure master slave

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Column_Configure_(procedure) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Set column configuration options for Slave widget in Master grid.

SOURCE

   procedure Column_Configure
     (Master, Slave: in Tk_Widget'Class; Options: in String) with
      Pre => Options /= "";

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Slave   - Tk_Widget inside Master
 Options - Tk options for selected Slave

EXAMPLE

      -- Set the weight of the column to 3 for My_Frame grid and My_Label widget
      Column_Configure(My_Frame, My_Label, "-weight 3");

SEE ALSO

 TkGrid.Column_Configure_(function)

COMMANDS

 grid columnconfigure master slave ?-option value...?

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Grid [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Add to the selected widget with selected options to grid

SOURCE

   procedure Grid(Slave: in Tk_Widget'Class; Options: in String := "");

PARAMETERS

 Slave   - Tk_Widget to add
 Options - Option to grid action. Default value is empty

EXAMPLE

   -- Add My_Label widget to the grid with default options
   Tcl.Tk.Ada.Grid.Grid(My_Label);
   -- Add My_Entry widget to the grid in first row and second column
   Tcl.Tk.Ada.Grid.Grid(My_Entry, "-row 0 -column 1");

COMMANDS

 grid slave ?options?

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Grid_Anchor_(function) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get the anchor's direction of the selected grid

SOURCE

   function Grid_Anchor(Master: in Tk_Widget'Class) return String;

PARAMETERS

 Master - Tk_Widget which is set as grid

RESULT

 A direction in which the grid anchor is set

EXAMPLE

      -- Get the anchor for the My_Frame widget
      Anchor: constant String := Grid_Anchor(My_Frame);

SEE ALSO

 TkGrid.Grid_Anchor_(procedure)

COMMANDS

 grid anchor master

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Anchor_(procedure) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Set the anchor's direction for the selected grid

SOURCE

   procedure Grid_Anchor(Master: in Tk_Widget'Class; Direction: in String) with
      Pre => Direction /= "";

PARAMETERS

 Master    - Tk_Widget which is set as grid
 Direction - Direction in which anchor of the grid should be set.

EXAMPLE

   -- Set the anchor to north for My_Main_Window widget
   Grid_Anchor(My_Main_Window, "n");

SEE ALSO

 TkGrid.Grid_Anchor_(function)

COMMANDS

 grid anchor master anchor

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_BBox [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get size of bounding box of the selected grid

SOURCE

   function Grid_BBox
     (Master: in Tk_Widget'Class; Column, Row, Column2, Row2: in String := "")
      return String;

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Column  - Starting column from which bounding box will be count. Default
           is empty
 Row     - Starting row from which bounding box will be count. Default is
           empty
 Column2 - Ending column from which bounding box will be count. Default
           is empty
 Row2    - Ending row from which bounding box will be count. Default is
           empty

RESULT

 If all parameters are empty, return bounding box for whole grid. If
 only Column and Row specified, return box for the selected cell. If all
 parameters are specified, return box for selected cells.

EXAMPLE

   -- Get the bounding box for the whole My_Frame widget grid
   Coordinates: constant String := Grid_BBox(My_Frame);
   -- Get the bounding box for the first row of My_Window grid and first and second column
   Coordinates: constant String := Grid_BBox(My_Window, "0", "0", "1", "0");

COMMANDS

 grid bbox master ?column row? ?column2 row2?

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Configure [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Tells the grid how to configure the specified Slave window.

SOURCE

   procedure Grid_Configure
     (Slave: in Tk_Widget'Class; Options: in String := "");

PARAMETERS

 Slave   - Tk_Widget to configure
 Options - Grid options for the slave

EXAMPLE

   -- Insert My_Label slave to second column
   Grid_Configure(My_Label, "-column 1");

COMMANDS

 grid configure slave ?options?

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Grid_Forget [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Removes the Slave window from the grid list for its master
 and unmaps their windows.

SOURCE

   procedure Grid_Forget(Slave: in Tk_Widget'Class);

PARAMETERS

 Slave - Tk_Widget to remove

EXAMPLE

   -- Remove (hide) My_Label widget from UI
   Grid_Forget(My_Label);

COMMANDS

 grid forget slave

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Grid_Info [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get grid options of the selected widget

SOURCE

   function Grid_Info(Slave: in Tk_Widget'Class) return String;

PARAMETERS

 Slave - Tk_Widget to query

RESULT

 String with list whose elements are the current configuration
 state of the specified Slave window.

EXAMPLE

   -- Get information about widget My_Label's grid configuration
   -- Configuration: constant String := Grid_Info(My_Label);

COMMANDS

 grid info slave

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Grid_Location [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get column and row number on selected screen point in the selected grid

SOURCE

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

PARAMETERS

 Master - Tk_Widget which is set as grid
 X      - X coordinate of screen point to check
 Y      - Y coordinate of screen point to check

RESULT

 Number of column and row at selected screen point. If point is on the
 or above the selected grid, return -1

EXAMPLE

   -- Get the column and row number for point X=23, Y=67 in grid My_Main_Window
   Location: constant String := Grid_Location(My_Main_Window, "23", "67");

COMMANDS

 grid location master x y

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Propagate_(function) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get current state of propagatio for the selected grid

SOURCE

   function Grid_Propagate(Master: in Tk_Widget'Class) return String;

PARAMETERS

 Master - Tk_Widget which is set as grid to query

RESULT

 0 if propagation is disabled, otherwise 1

EXAMPLE

      -- Get the propagation state of grid My_Main_Window
      Propagation: constant String := Grid_Propagate(My_Main_Window);

SEE ALSO

 TkGrid.Grid_Propagate_(procedure)

COMMANDS

 grid propagate master

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Propagate_(procedure) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Enable or disable propagation for the selected grid

SOURCE

   procedure Grid_Propagate(Master: in Tk_Widget'Class; Value: in String) with
      Pre => Value /= "";

PARAMETERS

 Master - Tk_Widget which is set as grid to modify
 Value  - New value for propagation. 1, on, true enables, 0, off,
          false disable propagation.

EXAMPLE

      -- Enable propagation for the grid My_Main_Window
      Grid_Propagate(My_Main_Window, "on");
      -- Disbale propagation for the grid My_Frame
      Grid_Propagete(My_Frame, "0");

SEE ALSO

 TkGrid.Grid_Propagate_(function)

COMMANDS

 grid propagate master boolean

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Remove [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Removes the Slave window from the grid list for its master
 and unmaps their windows but remember their positions in the grid

SOURCE

   procedure Grid_Remove(Slave: in Tk_Widget'Class);

PARAMETERS

 Slave - Tk_Widget to remove

EXAMPLE

   -- Remove My_Label from grid
   Grid_Remove(My_Label);

COMMANDS

 grid remove slave

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Size [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get size of grid

SOURCE

   function Grid_Size(Master: in Tk_Widget'Class) return String;

PARAMETERS

 Master - Tk_Widget which is set as grid

RESULT

 First value is columns amount, second value is rows amount of the
 selected grid

EXAMPLE

   -- Get the size of My_Main_Window grid
   Size: constant String := Grid_Size(My_Main_Window);

COMMANDS

 grid size master

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Grid_Slaves [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get list of slaves in the selected grid

SOURCE

   function Grid_Slaves
     (Master: in Tk_Widget'Class; Option: in String := "") return String;

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Option  - Can be -row [number], -column [number] or empty. Default value
           is empty

RESULT

 If Option is empty, return all slaves of the selected grid. If option
 is -row then return slaves in the selected row. If option is -column
 then return slaves in the selected column

EXAMPLE

   -- Get the list of slaves in My_Main_Window first row
   Slaves: constant String := Grid_Slaves(My_Main_Window, "-row 0");

COMMANDS

 grid slaves master ?-option value?

HISTORY

 8.6.2 - Added

TkGrid/TkGrid.Row_Configure_(function) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Get row configuration options for Slave widget in Master grid.

SOURCE

   function Row_Configure(Master, Slave: in Tk_Widget'Class) return String;

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Slave   - Tk_Widget inside Master

RESULT

 String with row configuration options for selected Slave widget

EXAMPLE

      -- Get all configuration options of My_Label widget's row in My_Main_Window grid
      -- Options: constant String := Row_Configure(My_Main_Window, My_Label);

SEE ALSO

 TkGrid.Row_Configure_(procedure)

COMMANDS

 grid rowconfigure master slave

HISTORY

 8.6.1 - Added

TkGrid/TkGrid.Row_Configure_(procedure) [ Subprograms ]

[ Top ] [ TkGrid ] [ Subprograms ]

FUNCTION

 Set row configuration options for Slave widget in Master grid.

SOURCE

   procedure Row_Configure
     (Master, Slave: in Tk_Widget'Class; Options: in String) with
      Pre => Options /= "";

PARAMETERS

 Master  - Tk_Widget which is set as grid
 Slave   - Tk_Widget inside Master
 Options - Tk options for selected Slave

EXAMPLE

   -- Set minimal size of My_Label widget's row in My_Main_Window grid to 20 pixels
   -- Row_Configure(My_Main_Window, My_Label, "-minsize 20");

SEE ALSO

 TkGrid.Row_Configure_(function)

COMMANDS

 grid rowconfigure master slave -option value?...?

HISTORY

 8.6.1 - Added