natiny_view_set_expand

C
void natiny_view_set_expand(NatinyView view, bool expand);

Sets whether a view takes the free space of its parent, sharing it equally with every sibling that expands too.

Parameters

Name Type Description
view NatinyView View handle
expand bool true to take the free space

Example

C
natiny_view_set_min_size(sidebar, 220.0f, 0.0f);
natiny_view_set_expand(content, true);

/* an empty view pushing the buttons after it to the right */
NatinyView spacer = natiny_view_create(NATINY_LAYOUT_FREE);
natiny_view_set_parent(spacer, footer);
natiny_view_set_expand(spacer, true);