- New Objects (Flexbox, Graph, Treeview) - Pluginsystem to add/remove functionality - Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject - Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox - Removed the Animation Object, and added a animation plugin instead - Removed the Graphic Object and merged it's functionality with the image object - Updated currently existing objects
840 B
840 B
addLine
Description
Adds a line to a Textfield object at a specified index position.
Parameteres
stringtext - The text you want to add as a new linenumberOptional - The position at which the new line should be added
Returns
objectThe object in use
Usage
- Adds a line
local basalt = require("basalt")
local mainFrame = basalt.createFrame("myFirstFrame")
local aTextfield = mainFrame:addTextfield("myFirstTextfield")
aTextfield:addLine("Hello, world!", 1)
basalt.autoUpdate()
In this example, a Textfield object is created and added to the mainFrame. The addLine method is then called to add a new line containing the text "Hello, world!" at the specified index position (1 in this case).
<textfield>
<lines>
<line>Hello!</line>
</lines>
</textfield>