This page has been translated automatically.
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
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
注意! 这个版本的文档是过时的,因为它描述了一个较老的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 - 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
Build: ()