ClanLib SDK

Standard components

Component

All components inherit from CL_GUIComponent, and therefore they all share the base css properties as defined below in CL_Component section.

CL_Component API Reference

Available CSS Properties

PropertyTypeDefaultConditionExplanation
minimum-widthint0
minimum-heightint0
maximum-widthint4026531839
maximum-heightint4026531839
preferred-widthint0
preferred-heightint0
 
bg-imagestringnoneResource name of image
 
bg-image-sizing[tile, center, repeat, stretch]stretchbg-image is set
 
bg-image-sizing-leftint0bg-image-sizing is repeat or stretch
bg-image-sizing-topint0bg-image-sizing is repeat or stretch
bg-image-sizing-rightint0bg-image-sizing is repeat or stretch
bg-image-sizing-bottomint0bg-image-sizing is repeat or stretch
bg-image-sizing-center-widthint0bg-image-sizing is repeat or stretch
bg-image-sizing-center-heightint0bg-image-sizing is repeat or stretch
 
margin-topint0bg-image is not set
margin-leftint0bg-image is not set
margin-rightint0bg-image is not set
margin-bottomint0bg-image is not set
 
border-topint0
border-leftint0
border-rightint0
border-bottomint0
 
padding-topint0
padding-leftint0
padding-rightint0
padding-bottomint0
 
bg-colorcolortransparentbg-image is not set
border-colorcolortransparentbg-image is not set

Label

CL_Label API Reference
PartStatesExplanation
LabelNormal, Hot, Disabled
PartPropertyTypeDefaultConditionExplanation
Labeltext-colorcolorblack
 
Labelfont-weightint or [normal, bold, bolder, light, lighter]normal
Labelfont-sizeint-11
Labelfont-style[none, italic]none
Labelfont-familystringTahoma
 
Labelalign[left, center, right, justify]left
Labelvertical-align[top, center, bottom]center

LineEdit

CL_LineEdit API Reference
PartStatesExplanation
LineEditNormal, Hot, Disabled
SelectionNormal, Disabled
CursorNormal, Disabled
PartPropertyTypeDefaultConditionExplanation
LineEdittext-colorcolorblack
 
LineEditfont-weightint or [normal, bold, bolder, light, lighter]normal
LineEditfont-sizeint-11
LineEditfont-style[none, italic]none
LineEditfont-familystringTahoma
 
Selectiontext-colorcolorwhite
 
Selectionfont-weightint or [normal, bold, bolder, light, lighter]normal
Selectionfont-sizeint-11
Selectionfont-style[none, italic]none
Selectionfont-familystringTahoma

ScrollBar

CL_ScrollBar API Reference
PartStatesExplanation
ScrollBarNormal, Hot, Disabled
 
ScrollButton.UpNormal, Hot, Disabled, PressedOnly available for vertical scrollbars
ScrollButton.DownNormal, Hot, Disabled, PressedOnly available for vertical scrollbars
ScrollTrack.UpNormal, Hot, Disabled, PressedOnly available for vertical scrollbars
ScrollTrack.DownNormal, Hot, Disabled, PressedOnly available for vertical scrollbars
ScrollThumb.VerticalNormal, Hot, Disabled, PressedOnly available for vertical scrollbars
 
ScrollButton.LeftNormal, Hot, Disabled, PressedOnly available for horizontal scrollbars
ScrollButton.RightNormal, Hot, Disabled, PressedOnly available for horizontal scrollbars
ScrollTrack.LeftNormal, Hot, Disabled, PressedOnly available for horizontal scrollbars
ScrollTrack.RightNormal, Hot, Disabled, PressedOnly available for horizontal scrollbars
ScrollThumb.HorizontalNormal, Hot, Disabled, PressedOnly available for horizontal scrollbars
PartPropertyTypeDefaultConditionExplanation

Note: ScrollButton parts use preferred size, and should be set.

PushButton

CL_PushButton API Reference
PartStatesExplanation
ButtonNormal, Hot, Pressed, Defaulted, Disabled, Flat
FocusNormal
PartPropertyTypeDefaultConditionExplanation
Buttontext-colorcolorblack
 
Buttonfont-weightint or [normal, bold, bolder, light, lighter]normal
Buttonfont-sizeint-11
Buttonfont-style[none, italic]none
Buttonfont-familystringTahoma
 
Buttonalign[left, center, right, justify]left
Buttonvertical-align[top, center, bottom]center

ListView

CL_ListView API Reference
PartStatesExplanation
ListViewNormal
RowNormal, Alternate
Row_openerOpen, Closed
SelectionNormal
Columns_bgNormal
ColumnNormalThis is only the background for the columns behind cells, not the header
CellNormal, Details, IconsDetails and Icons states are only available in their specific listviewmodes
Icon_selectionNormal
mouse_selectionNormal
PartPropertyTypeDefaultConditionExplanation
Cellfont-weightint or [normal, bold, bolder, light, lighter]normal
Cellfont-sizeint-11
Cellfont-style[none, italic]none
Cellfont-familystringTahoma
 
Celltext-colorcolorblack
Celltext-color-selectedcolorwhite
 
Cellicon-colorcolorwhite
Cellicon-color-selectedcolorwhite
Cellicon-color-overlaycolorwhite
Cellicon-color-selected-overlaycolorwhite
 
Row_openeroffset-xint0Only in listview_mode_details
Row_openeroffset-yint0Only in listview_mode_details
Rowindent-widthint20Only in listview_mode_details
Cellopener-icon-gapint6Only in listview_mode_details
Cellicon-text-gapint6Only in listview_mode_details
Cellicon-offset-yint0Only in listview_mode_details
Cellicon-widthint16Only in listview_mode_details and listview_mode_icons
Cellicon-heightint16Only in listview_mode_details and listview_mode_icons
Cellline-edit-offset-leftint0Only in listview_mode_details and listview_mode_icons
Cellline-edit-offset-topint0Only in listview_mode_details and listview_mode_icons
Cellline-edit-offset-bottomint0Only in listview_mode_details and listview_mode_icons
Cellline-edit-offset-rightint0Only in listview_mode_details and listview_mode_icons

Note: Cell and Part_opener use preferred size, and should be set.

ListView Header

CL_ListViewHeader API Reference
PartStatesExplanation
Listview_headerNormal
ColumnheaderNormal, Pressed, Hot
PartPropertyTypeDefaultConditionExplanation
Listview_headertext-colorcolorblack
Listview_headerfont-weightint or [normal, bold, bolder, light, lighter]normal
Listview_headerfont-sizeint-11
Listview_headerfont-style[none, italic]none
Listview_headerfont-familystringTahoma