Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
SplitContainer¶
Inherits: Container < Control < CanvasItem < Node < Object
Inherited By: HSplitContainer, VSplitContainer
A container that splits two child controls horizontally or vertically and provides a grabber for adjusting the split ratio.
描述¶
A container that accepts only two child controls, then arranges them horizontally or vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls.
教程¶
属性¶
|
||
|
||
|
||
|
Methods¶
void |
Theme Properties¶
|
||
|
||
|
||
信号¶
dragged ( int offset )
Emitted when the dragger is dragged by user.
Enumerations¶
enum DraggerVisibility:
DraggerVisibility DRAGGER_VISIBLE = 0
The split dragger is visible when the cursor hovers it.
The split dragger is never visible.
The split dragger is never visible and its space collapsed.
Property Descriptions¶
bool collapsed = false
If true
, the area of the first Control will be collapsed and the dragger will be disabled.
DraggerVisibility dragger_visibility = 0
void set_dragger_visibility ( DraggerVisibility value )
DraggerVisibility get_dragger_visibility ( )
Determines the dragger's visibility. See DraggerVisibility for details.
int split_offset = 0
The initial offset of the splitting between the two Controls, with 0
being at the end of the first Control.
bool vertical = false
If true
, the SplitContainer will arrange its children vertically, rather than horizontally.
Can't be changed when using HSplitContainer and VSplitContainer.
Method Descriptions¶
void clamp_split_offset ( )
Clamps the split_offset value to not go outside the currently possible minimal and maximum values.
Theme Property Descriptions¶
int autohide = 1
Boolean value. If 1 (true
), the grabber will hide automatically when it isn't under the cursor. If 0 (false
), it's always visible.
int minimum_grab_thickness = 6
The minimum thickness of the area users can click on to grab the splitting line. If separation or h_grabber / v_grabber's thickness are too small, this ensure that the splitting line can still be dragged.
int separation = 12
The space between sides of the container.
Texture2D h_grabber
The icon used for the grabber drawn in the middle area when vertical is false
.
Texture2D v_grabber
The icon used for the grabber drawn in the middle area when vertical is true
.