This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

WidgetGridBox Class

This class creates a grid box.

WidgetGridBox Class

This class inherits from WidgetVBox

Members


WidgetGridBox (Gui gui, int columns = 2, int space_x = 0, int space_y = 0)

Constructor. Creates a grid box with given parameters.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • int columns = 2 - Number of columns in the grid. This is an optional parameter.
  • int space_x = 0 - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int space_y = 0 - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

int getColumnRatio (int num)

Returns the current width-to-height ratio of the specified column.

Arguments

  • int num - Column number in range from 0 to the total number of columns.

Return value

Width-to-height ratio.

int getNumColumns ()

Returns the number of columns in the grid.

Return value

Number of columns.

void setColumnRatio (int num, int ratio)

Sets the width-to-height ratio of the specified column.

Arguments

  • int num - Column number in range from 0 to the total number of columns.
  • int ratio - Width-to-height ratio.

void setNumColumns (int num)

Sets a number of columns in the grid.

Arguments

  • int num - Number of columns.
Last update: 03.07.2017
Build: ()