Files
Basalt/docs/docs1_6/objects/Object/setFocus.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

475 B

Object

setFocus

Sets the object to be the focused object. If you click on an object, it's normally automatically the focused object. For example, if you call :show() on a frame, and you want this particular frame to be in the foreground, you should also use :setFocus()

Returns

  1. object The object in use

Usage

  • Sets the button to the focused object
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setFocus()