Files
Basalt/docs/objects/Object/onResize.md
Robert Jelic 1d3e2018ef docs update
Updated some docs stuff
2022-10-09 12:05:30 +02:00

21 lines
451 B
Markdown

# onResize
`onResize(self)`<br>
This is a custom event which gets triggered as soon as the parent frame gets resized.
Here is a example on how to add a onResize event to your button:
```lua
local basalt = require("basalt")
local main = basalt.createFrame()
local aButton = main:addButton():setPosition(3,3)
local function onButtonResize(self)
local width = main:getWidth()
self:setSize(width, 3)
end
aButton:onResize(onButtonResize)
```