Skip to content

GraphFrame

Inherits: GraphElement < Container < Control < CanvasItem < Entity < Object

GraphFrame is a special GraphElement that can be used to organize other GraphElements inside a GraphEdit.

GraphFrame is a special GraphElement to which other GraphElements can be attached. It can be configured to automatically resize to enclose all attached GraphElements. If the frame is moved, all the attached GraphElements inside it will be moved as well.

A GraphFrame is always kept behind the connection layer and other GraphElements inside a GraphEdit.

Type Name Default
bool autoshrink_enabled true
int autoshrink_margin 40
int drag_margin 16
Control.MouseFilter mouse_filter 0 (overrides Control)
Color tint_color Color(0.3, 0.3, 0.3, 0.75)
bool tint_color_enabled false
String title ""
Returns Method
HBoxContainer get_titlebar_hbox()

autoshrink_changed

autoshrink_changed()

Emitted when autoshrink_enabled or autoshrink_margin changes.

resizer_color

Color resizer_color (color) = Color(0.875, 0.875, 0.875, 1)

panel

StyleBox panel (style)

panel_selected

StyleBox panel_selected (style)

titlebar

StyleBox titlebar (style)

titlebar_selected

StyleBox titlebar_selected (style)

autoshrink_enabled

bool autoshrink_enabled = true

If true, the frame’s rect will be adjusted automatically to enclose all attached GraphElements.

autoshrink_margin

int autoshrink_margin = 40

The margin around the attached nodes that is used to calculate the size of the frame when autoshrink_enabled is true.

drag_margin

int drag_margin = 16

The margin inside the frame that can be used to drag the frame.

tint_color

Color tint_color = Color(0.3, 0.3, 0.3, 0.75)

The color of the frame when tint_color_enabled is true.

tint_color_enabled

bool tint_color_enabled = false

If true, the tint color will be used to tint the frame.

title

String title = ""

Title of the frame.

get_titlebar_hbox

HBoxContainer get_titlebar_hbox()

Returns the HBoxContainer used for the title bar, only containing a Label for displaying the title by default.

This can be used to add custom controls to the title bar such as option or close buttons.