Module beamui.widgets.grid
Grid views on data.
Synopsis
auto grid = new StringGridWidget("GRID1");
grid .showColHeaders = true;
grid .showRowHeaders = true;
grid .resize(30, 50);
grid .fixedCols = 3;
grid .fixedRows = 2;
//grid.rowSelect = true; // testing full row selection
grid .selectCell(4, 6, false);
// create sample grid content
foreach (y; 0 .. grid .rows)
{
foreach (x; 0 .. grid .cols)
{
grid .setCellText(x, y, format("cell(%s, %s)"d, x + 1, y + 1));
}
grid .setRowTitle(y, to!dstring(y + 1));
}
foreach (x; 0 .. grid .cols)
{
int col = x + 1;
dstring res;
int n1 = col / 26;
int n2 = col % 26;
if (n1)
res ~= n1 + 'A';
res ~= n2 + 'A';
grid .setColTitle(x, res);
}
grid .autoFit();
Import line
import beamui .widgets .grid;