The master branch was reverted to 1.7 because it was very unstable (bugs and stuff that wasn't mentioned on the documentation page yet) - features will come back with 2.0 - fixed debug window - fixed flexbox not sending drag events to it's children - small docs updates for 1.7 - removed the examples because the are outdated
28 lines
462 B
Markdown
28 lines
462 B
Markdown
## setSelection
|
||
|
||
### Description
|
||
|
||
Changes the color when selecting text.
|
||
|
||
### Parameteres
|
||
|
||
1. `number|color` foreground color - The text color.
|
||
2. `number|color` background color - ´The background color.
|
||
|
||
### Returns
|
||
|
||
1. `object` The object in use
|
||
|
||
### Usage
|
||
|
||
```lua
|
||
local basalt = require("basalt")
|
||
|
||
local mainFrame = basalt.createFrame()
|
||
local aTextfield = mainFrame:addTextfield()
|
||
|
||
aTextfield:setSelection(colors.white, colors.blue)
|
||
|
||
basalt.autoUpdate()
|
||
```
|