import{_ as i,a,b as t,ag as e}from"./chunks/framework.BcrMLAmg.js";const g=JSON.parse('{"title":"Text Wrapping","description":"","frontmatter":{},"headers":[],"relativePath":"guides/textWrapping.md","filePath":"guides/textWrapping.md","lastUpdated":1745138834000}'),n={name:"guides/textWrapping.md"};function l(h,s,p,k,r,d){return t(),a("div",null,s[0]||(s[0]=[e(`

Text Wrapping

Labels in Basalt provide automatic text wrapping functionality. By default, a label adjusts its width to fit the text content. However, you can control this behavior to make the text wrap instead.

Basic Usage

lua
local main = basalt.createFrame()
local label = main:addLabel()
    :setSize(20, 5)     -- Set fixed width
    :setAutoSize(false) -- Disable auto-sizing
    :setText("This is a long text that will automatically wrap to fit the label's width")

Understanding Auto-Size

Examples

lua
-- Default: Label grows with text
label:setText("Long text...")  -- Width adjusts automatically

-- Fixed width with wrapping
label:setSize(15, 5)
    :setAutoSize(false)       -- Enable text wrapping
    :setText("Text wraps to fit 15 characters width")
`,8)]))}const o=i(n,[["render",l]]);export{g as __pageData,o as default};