ColumnSeparatorProperty

Description of the line style that will be drawn at column breaks, see ColumnLayout

Create from source

func NewColumnSeparator(style int, color Color, width SizeUnit) ColumnSeparatorProperty

Creates the new ColumnSeparatorProperty object and returns its interface. Arguments: style - determines the line style. Valid values: 0 (NoneLine), 1 (SolidLine), 2 (DashedLine), 3 (DottedLine), or 4 (DoubleLine). color - determines the line color, width - determines the line thickness.

func NewColumnSeparatorProperty(params Params) ColumnSeparatorProperty

Creates the new ColumnSeparatorProperty object and returns its interface. The following properties can be used: "style" (Style) - determines the line style (type is int). Valid values: 0 (NoneLine), 1 (SolidLine), 2 (DashedLine), 3 (DottedLine), or 4 (DoubleLine)."color" (ColorTag) - determines the line color (type is [Color]). "width" (Width) - determines the line thickness (type is [SizeUnit]).

Create from resource

ColumnLayout {
    column-separator = _{
        style = solid,
        width = 1px,
        color = #FF000000,
    },
}

Interface description

Inherit methods from Properties, fmt.Stringer

ViewBorder(session Session) ViewBorder

Returns column separator description in a form of ViewBorder struct

Properties

"color"

Line color

Constant: ColorTag

Types: Color, string

Internal type is Color, other types converted to it during assignment

See Color description for more details

Examples

ColumnLayout {
    width = 5em,
    height = 5em,
    column-count = 2,
    column-separator = _{
        style = solid,
        width = 1px,
        color = #FF000000,
    },
    content = [
        "Some text",
        "Some text",
    ],
}
layout := rui.NewColumnLayout(session, rui.Params{
    rui.Width:                rui.Em(5),
    rui.Height:               rui.Em(5),
    rui.ColumnCount:          2,
    rui.ColumnSeparator: rui.NewColumnSeparatorProperty(rui.Params{
        rui.Style:    rui.SolidLine,
        rui.ColorTag: "black",
        rui.Width:    rui.Px(1),
    }),
    rui.Content: []string{
        "Some text",
        "Some text",
    },
})

"style"

Line style

Constant: Style

Types: int, string

Values

int string Description
0(NoneLine) "none" The separator will not be drawn
1(SolidLine) "solid" Solid line as a separator
2(DashedLine) "dashed" Dashed line as a separator
3(DottedLine) "dotted" Dotted line as a separator
4(DoubleLine) "double" Double line as a separator

"width"

Line width

Constant: Width

Types: SizeUnit, SizeFunc, string, float, int

Internal type is SizeUnit, other types converted to it during assignment

See SizeUnit description for more details

Examples

ColumnLayout {
    width = 5em,
    height = 5em,
    column-count = 2,
    column-separator = _{
        style = solid,
        width = 1px,
        color = #FF000000,
    },
    content = [
        "Some text",
        "Some text",
    ],
}
layout := rui.NewColumnLayout(session, rui.Params{
    rui.Width:                rui.Em(5),
    rui.Height:               rui.Em(5),
    rui.ColumnCount:          2,
    rui.ColumnSeparator: rui.NewColumnSeparatorProperty(rui.Params{
        rui.Style:    rui.SolidLine,
        rui.ColorTag: "black",
        rui.Width:    rui.Px(1),
    }),
    rui.Content: []string{
        "Some text",
        "Some text",
    },
})