API reference
Preparing search index…

ImGui.BeginChild

  • Begin a child window with independent scrolling and clipping.

    Parameters

    str_id
    string | Uint8Array

    String identifier hashed with the current ID stack to distinguish this item or scope.

    size

    Child-window width and height in pixels: 0 uses the remaining region, positive fixes an axis, negative uses remaining space minus that amount.

    child_flags
    number = 0

    ImGuiChildFlags options controlling this operation; combine compatible flag bits with |.

    window_flags
    number = 0

    ImGuiWindowFlags options controlling this operation; combine compatible flag bits with |.

    Returns

    boolean

    True when child contents should be submitted; false when fully clipped or collapsed. Call EndChild() even when false (EndChildFrame() for the legacy frame helper).

    Child windows provide independent scrolling and clipping inside a parent window and may contain nested child windows.

    • Each size axis is independent: 0 uses the remaining parent space, a positive value specifies a size, and a negative value leaves that distance from the available right or bottom boundary.

    • ImGuiChildFlags.AutoResizeX and ImGuiChildFlags.AutoResizeY size an axis from its contents. Enabling both is not recommended for a scrolling region.

    • Always call EndChild() after BeginChild(), even if it returns false. A false return means the child is collapsed or fully clipped and its contents may be skipped. This matches Begin()/End() but differs from most other begin/end pairs, whose end call is conditional on a true return.

    • Since 1.90 (November 2023), child flags replace the old boolean border argument. Use 0 or ImGuiChildFlags.None for no border, or ImGuiChildFlags.Borders for a border. The border flag retains the numeric value 1 for compatibility.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0