ViewBorder

Table of contents

Describes parameters of a single view border

type ViewBorder struct {
    Color Color
    Style int
    Width SizeUnit
}
Member Type Description
Color Color Color of the border
Style int Style of the border, see below
Width SizeUnit Width of the border

where possible values for Style are:

Value Constant Text Description
0 NoneLine "none" The border will not be drawn
1 SolidLine "solid" Solid line as a border
2 DashedLine "dashed" Dashed line as a border
3 DottedLine "dotted" Dotted line as a border
4 DoubleLine "double" Double line as a border

Text values are used while describing view border in resource files

Examples

View {
    width = 5em,
    height = 5em,
    border = _{ style = solid, width = 1px, color = #FF000000 },
}
view := rui.NewView(session, rui.Params{
    rui.Width:  rui.Em(5),
    rui.Height: rui.Em(5),
    rui.Border: rui.ViewBorder{
        Style: rui.SolidLine,
        Color: rui.Black,
        Width: rui.Px(1),
    },
})
func GetColumnSeparator(view View, subviewID ...string) ViewBorder

Returns ViewBorder struct which specifies the line drawn between columns in a multi-column ColumnLayout. If the second argument (subviewID) is not specified or is an empty string then a top position of the first argument (view) is returned