1Tk_SetGrid(3)                Tk Library Procedures               Tk_SetGrid(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_SetGrid, Tk_UnsetGrid - control the grid for interactive resizing
9

SYNOPSIS

11       #include <tk.h>
12
13       Tk_SetGrid(tkwin, reqWidth, reqHeight, widthInc, heightInc)
14
15       Tk_UnsetGrid(tkwin)
16

ARGUMENTS

18       Tk_Window tkwin (in)              Token for window.
19
20       int reqWidth (in)                 Width  in grid units that corresponds
21                                         to  the  pixel  dimension  tkwin  has
22                                         requested via Tk_GeometryRequest.
23
24       int reqHeight (in)                Height in grid units that corresponds
25                                         to  the  pixel  dimension  tkwin  has
26                                         requested via Tk_GeometryRequest.
27
28       int widthInc (in)                 Width of one grid unit, in pixels.
29
30       int heightInc (in)                Height of one grid unit, in pixels.
31_________________________________________________________________
32
33

DESCRIPTION

35       Tk_SetGrid  turns  on  gridded geometry management for tkwin's toplevel
36       window and specifies the geometry of the grid.  Tk_SetGrid is typically
37       invoked  by  a  widget  when  its setGrid option is true.  It restricts
38       interactive resizing of tkwin's toplevel window so that the space allo‐
39       cated to the toplevel is equal to its requested size plus or minus even
40       multiples of widthInc and heightInc.   Furthermore,  the  reqWidth  and
41       reqHeight values are passed to the window manager so that it can report
42       the window's size in grid units during interactive resizes.  If tkwin's
43       configuration  changes (e.g., the size of a grid unit changes) then the
44       widget should invoke Tk_SetGrid again with the new information.
45
46       Tk_UnsetGrid cancels gridded geometry management for  tkwin's  toplevel
47       window.
48
49       For  each toplevel window there can be at most one internal window with
50       gridding enabled.  If Tk_SetGrid or Tk_UnsetGrid is invoked  when  some
51       other  window is already controlling gridding for tkwin's toplevel, the
52       calls for the new window have no effect.
53
54       See the wm manual entry for additional information on gridded  geometry
55       management.
56
57

KEYWORDS

59       grid, window, window manager
60
61
62
63Tk                                    4.0                        Tk_SetGrid(3)
Impressum