Improve Fl_Grid example code

Add 'grid->end();' although it's redundant in this specific example.
This commit is contained in:
Albrecht Schlosser 2023-10-19 14:22:58 +02:00
parent ca7844cf94
commit 5c7ad00e07
2 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,7 @@ const Fl_Grid_Align FL_GRID_BOTTOM_RIGHT = FL_GRID_BOTTOM | FL_GRID_RIGHT;
grid->widget(b4, 2, 0);
grid->widget(b6, 2, 2);
grid->show_grid(0); // 1 to display grid helper lines
grid->end();
win->end();
win->resizable(grid);
win->size_range(300, 100);

View File

@ -41,6 +41,7 @@ int main(int argc, char **argv) {
grid->widget(b4, 2, 0);
grid->widget(b6, 2, 2);
// grid->show_grid(1); // enable to display grid helper lines
grid->end();
win->end();
win->resizable(grid);
win->size_range(300, 100);