]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/overviews/grid.h
extracted the part of ProcessEvent() which is repeated multiple times during the...
[wxWidgets.git] / docs / doxygen / overviews / grid.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: grid.h
3// Purpose: topic overview
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10
11@page overview_grid wxGrid Overview
12
13Classes: wxGrid
14
15@li @ref overview_grid_intro
16@li @ref overview_grid_simpleexample
17@li @ref overview_grid_complexexample
18@li @ref overview_grid_classrelations
19@li @ref overview_grid_keyboardmouse
20
21
22<hr>
23
24
25@section overview_grid_intro Introduction
26
27wxGrid and its related classes are used for displaying and editing tabular data.
28
29
30@section overview_grid_simpleexample Getting started: a simple example
31
32For simple applications you need only refer to the wxGrid class in your
33code. This example shows how you might create a grid in a frame or
34dialog constructor and illustrates some of the formatting functions.
35
36@code
37 // Create a wxGrid object
38
39 grid = new wxGrid( this,
40 -1,
41 wxPoint( 0, 0 ),
42 wxSize( 400, 300 ) );
43
44 // Then we call CreateGrid to set the dimensions of the grid
45 // (100 rows and 10 columns in this example)
46 grid->CreateGrid( 100, 10 );
47
48 // We can set the sizes of individual rows and columns
49 // in pixels
50 grid->SetRowSize( 0, 60 );
51 grid->SetColSize( 0, 120 );
52
53 // And set grid cell contents as strings
54 grid->SetCellValue( 0, 0, "wxGrid is good" );
55
56 // We can specify that some cells are read->only
57 grid->SetCellValue( 0, 3, "This is read->only" );
58 grid->SetReadOnly( 0, 3 );
59
60 // Colours can be specified for grid cell contents
61 grid->SetCellValue(3, 3, "green on grey");
62 grid->SetCellTextColour(3, 3, *wxGREEN);
63 grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
64
65 // We can specify the some cells will store numeric
66 // values rather than strings. Here we set grid column 5
67 // to hold floating point values displayed with width of 6
68 // and precision of 2
69 grid->SetColFormatFloat(5, 6, 2);
70 grid->SetCellValue(0, 6, "3.1415");
71@endcode
72
73
74@section overview_grid_complexexample A more complex example
75
76@todo Yet to be written
77
78
79@section overview_grid_classrelations How the wxGrid classes relate to each other
80
81@todo Yet to be written
82
83
84@section overview_grid_keyboardmouse Keyboard and mouse actions
85
86@todo Yet to be written
87
88*/
89