widthPercent

open fun widthPercent(percent: Float): T

Sets the width of the Component to be a percentage of its parent's width. Note that if the parent has unspecified width (e.g. it is an HScroll), then setting this will have no effect.

Parameters

percent

a value between 0 and 100.

See also