Table of Contents

separator

`separator()` creates a horizontal or vertical visual separator.

Constructor

separator()

Creates a separator object.

sep = separator().orientation_horizontal();

Common Component Methods

Most visible GUI controls support these methods:

Method Returns Description
`position(x, y)` self Sets the component position in pixels.
`size(width, height)` self Sets component size in pixels. Width and height are clamped to at least 1.
`visible(enabled)` self Shows or hides the component.
`enabled(enabled)` self Enables or disables user interaction.

Common component properties:

Property Type Description
`position_x` number Current x position.
`position_y` number Current y position.
`size_width` number Current width.
`size_height` number Current height.
`visible` boolean Current visible state.
`enabled` boolean Current enabled state.

Methods

Method Returns Description
`orientation_horizontal()` self Sets horizontal orientation.
`orientation_vertical()` self Sets vertical orientation.

Example

sep = separator().position(20, 50).size(220, 2).orientation_horizontal();
window().title("Separator").size(280, 120).add(sep).show();

Previous: led

Next: menu