natiny.view.set_min_size
natiny.view.set_min_size(view, width, height)
Sets the smallest size a view is given, whatever its content.
Parameters
| Name | Type | Description |
|---|---|---|
view |
number |
View handle |
width |
number |
Minimum width in drawing units; 0 for none |
height |
number |
Minimum height in drawing units; 0 for none |
Example
natiny.view.set_min_size(button, 120, 36)
-- as wide and tall as a line of text
local label = natiny.view.create(natiny.view.FREE, row)
natiny.view.set_min_size(label, natiny.font.measure_text(font, "Settings"))