Class
UITextSizeConstraint
Ensures that the size of text rendered by certain GuiObject classes
lies within the range described by
MaxTextSize and
MinTextSize.
A UITextSizeConstraint ensures that the size of text rendered by certain
GuiObject classes (TextLabel, TextButton, or
TextBox) lies within the range described by
MaxTextSize and
MinTextSize. It is meant to be used
alongside TextLabel.TextScaled, which automatically scales text to
fill its containing object. Like other UI constraints, it is applied when
parented to the object to be constrained.
It's recommended that no values lower than 9 be used for
MinTextSize property, otherwise text
may not be readable to most users.
Properties 2#
MaxTextSizeint | The largest size in pixels the font is allowed to be.ReadSafe |
MinTextSizeint | The smallest size in pixels the font is allowed to be.ReadSafe |
MaxTextSize: int#
ReadSafe
This property indicates the largest size in pixels the font is allowed to
be. It defaults to 1000 pixels and must be set larger than or equal to the
MinTextSize property.
If the affected GuiObject has its
TextScaled property set to true the text size
constrained by this property will scale dynamically with the container's
size. It will scale upwards with the GuiObject's size until the max size
is reached, at which point it will stay constant if the UI element
continues to grow.
MinTextSize: int#
ReadSafe
This property indicated the smallest size in pixels the font is allowed to
be. This value defaults to 1 pixel and must be set less than or equal to
UITextSizeConstraint.MaxTextSize.
If the affected GuiObject has its
TextScaled property set to true the text size
constrained by this property will scale dynamically with the container's
size. It will scale downwards with the GuiObject's size until the min size
is reached, at which point it will stay constant if the UI element
continues to shrink.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild