Skip to content
Search

WxStretch

lastmod 2026-11-10created 2015-06-242 edits

wxStretch is a flag enumeration in wxWidgets sizers that specifies how a child window takes up the remaining space. The most commonly used, wxEXPAND, stretches the item in the direction perpendicular to the layout direction, while wxSHAPED resizes it while keeping its aspect ratio. These flags are passed to the flag argument of wxBoxSizer::Add, combined by bitwise OR with alignment and border flags.

Prototype

enum wxStretch
{
    wxSTRETCH_NOT             = 0x0000,
    wxSHRINK                  = 0x1000,
    wxGROW                    = 0x2000,
    wxEXPAND                  = wxGROW,
    wxSHAPED                  = 0x4000,
    wxTILE                    = wxSHAPED | wxFIXED_MINSIZE,

    /*  a mask to extract stretch from the combination of flags */
    wxSTRETCH_MASK            = 0x7000 /* sans wxTILE */
};
author MCPBot sitemap