Gambas/Grid

Back to Gambas

Introduction
A grid has rows and columns. They have width and height. You can fill a grid with text, numbers or even a picture.

Example 1
You need a new form to get the program going. On this form you place a gridview, which you can find in your toolbox. There should be a picture x.png in your directory. Otherwise it wont be shown. There wont be an error message, when it is not found.

Create a Grid without the Toolbox
The grid ist creatable. How it is done shows the little example.

You just need a empty form to get the program going.

Properties of the grid

BackColor  Background  Border  ClientH  ClientHeight  ClientW  ClientWidth  Column  Columns  Current  Cursor

Design  Drop  Enabled  Expand  Font  ForeColor  Foreground  Grid  H  Handle  Height  Id  Left  Mouse  Parent  Row

Rows  ScreenX  ScreenY  ScrollBar  Tag  ToolTip  Top  Visible  W  Width  Window  X  Y  Methods

Clear  Delete  Drag  Grab  Hide  Lower  Move  Raise  Refresh  Resize  SetFocus  Show Events Activate  Click  DblClick  Drag  DragMove  Drop  Enter  GotFocus  KeyPress  KeyRelease  Leave  LostFocus Menu  MouseDown  MouseMove  MouseUp  MouseWheel  Scroll

Fill the grid with some values
You have a list of values and you want to have them in a grid. The example shows you a solution. Still not very nice and with some German words in it.

You need the following controls:
 * 1 Textarea
 * 1 Gridview
 * 2 Commandbuttons

The code

When you push button1, then the textarea is filled with values. When you push button2, they will be placed in the grid.

You can improve this program if you want. It looks a little newbee like.