Tk\_GeometryRequest(3) Tk Library Procedures Tk\_GeometryRequest(3)

```

```

# [NAME](#NAME)

Tk\_GeometryRequest, Tk\_SetMinimumRequestSize, Tk\_SetInternalBorder, Tk\_SetInternalBorderEx - specify desired geometry or internal border for a window

# [SYNOPSIS](#SYNOPSIS)

```
#include <tk.h>

Tk_GeometryRequest(tkwin, reqWidth, reqHeight)

Tk_SetMinimumRequestSize(tkwin, minWidth, minHeight)

Tk_SetInternalBorder(tkwin, width)

Tk_SetInternalBorderEx(tkwin, left, right, top, bottom)
```

# [ARGUMENTS](#ARGUMENTS)

Tk\_Window *tkwin* (in)

Window for which geometry is being requested.

int *reqWidth* (in)

Desired width for *tkwin*, in pixel units.

int *reqHeight* (in)

Desired height for *tkwin*, in pixel units.

int *minWidth* (in)

Desired minimum requested width for *tkwin*, in pixel units.

int *minHeight* (in)

Desired minimum requested height for *tkwin*, in pixel units.

int *width* (in)

Space to leave for internal border for *tkwin*, in pixel units.

int *left* (in)

Space to leave for left side of internal border for *tkwin*, in pixel units.

int *right* (in)

Space to leave for right side of internal border for *tkwin*, in pixel units.

int *top* (in)

Space to leave for top side of internal border for *tkwin*, in pixel units.

int *bottom* (in)

Space to leave for bottom side of internal border for *tkwin*, in pixel units.

```
    
```

# [DESCRIPTION](#DESCRIPTION)

**Tk\_GeometryRequest** is called by widget code to indicate its preference for the dimensions of a particular window. The arguments to **Tk\_GeometryRequest** are made available to the geometry manager for the window, which then decides on the actual geometry for the window. Although geometry managers generally try to satisfy requests made to **Tk\_GeometryRequest**, there is no guarantee that this will always be possible. Widget code should not assume that a geometry request will be satisfied until it receives a **ConfigureNotify** event indicating that the geometry change has occurred. Widget code should never call procedures like **Tk\_ResizeWindow** directly. Instead, it should invoke **Tk\_GeometryRequest** and leave the final geometry decisions to the geometry manager.

If *tkwin* is a top-level window, then the geometry information will be passed to the window manager using the standard ICCCM protocol.

**Tk\_SetInternalBorder** is called by widget code to indicate that the widget has an internal border. This means that the widget draws a decorative border inside the window instead of using the standard X borders, which are external to the window's area. For example, internal borders are used to draw 3-D effects. *Width* specifies the width of the border in pixels. Geometry managers will use this information to avoid placing any children of *tkwin* overlapping the outermost *width* pixels of *tkwin*'s area.

**Tk\_SetInternalBorderEx** works like **Tk\_SetInternalBorder** but lets you specify different widths for different sides of the window.

**Tk\_SetMinimumRequestSize** is called by widget code to indicate that a geometry manager should request at least this size for the widget. This allows a widget to have some control over its size when a propagating geometry manager is used inside it.

The information specified in calls to **Tk\_GeometryRequest**, **Tk\_SetMinimumRequestSize**, **Tk\_SetInternalBorder** and **Tk\_SetInternalBorderEx** can be retrieved using the macros **Tk\_ReqWidth**, **Tk\_ReqHeight**, **Tk\_MinReqWidth**, **Tk\_MinReqHeight**, **Tk\_MinReqWidth**, **Tk\_InternalBorderLeft**, **Tk\_InternalBorderRight**, **Tk\_InternalBorderTop** and **Tk\_InternalBorderBottom**. See the **Tk\_WindowId** manual entry for details.

# [KEYWORDS](#KEYWORDS)

geometry, request

8.4 Tk

---

Document: Tk_SetInternalBorder(3) from tk 9.0.4-r2 (Chainguard OS)
Source: https://downloads.sourceforge.net/sourceforge/tcl/tk9.0.4-src.tar.gz
