Click or drag to resize

StyleBox Properties

The StyleBox type exposes the following members.

Properties
  NameDescription
Public propertyContentMarginBottom

The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.

If this value is negative, it is ignored and a child-specific margin is used instead. For example for StyleBoxFlat the border thickness (if any) is used instead.

It is up to the code using this style box to decide what these contents are: for example, a Button respects this content margin for the textual contents of the button.

GetMargin(Margin) should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.

Public propertyContentMarginLeft

The left margin for the contents of this style box.Increasing this value reduces the space available to the contents from the left.

Refer to ContentMarginBottom for extra considerations.

Public propertyContentMarginRight

The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.

Refer to ContentMarginBottom for extra considerations.

Public propertyContentMarginTop

The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.

Refer to ContentMarginBottom for extra considerations.

Public propertyDynamicObject
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.)
Public propertyNativeInstance (Inherited from Object.)
Public propertyResourceLocalToScene

If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.

(Inherited from Resource.)
Public propertyResourceName

The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor.

(Inherited from Resource.)
Public propertyResourcePath

The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.

(Inherited from Resource.)
Top
See Also