Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins

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 - Number of columns in the grid. This is an optional parameter.
  • int space_x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int space_y - 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: 2017-07-03