wx.SampleGrid.BigGridFrame Class Reference

Example for use of extended GridTableBases and GridCellEditors. More...

List of all members.

Public Member Functions

 BigGridFrame (long sizeGrid)


Detailed Description

Example for use of extended GridTableBases and GridCellEditors.

Example originally designed to demonstrate low latency for repaint of large grids. Extended to also test and explain C# extensions of GridTableBase with registered data types and the implementation of instances of GridCellEditor in C#. Refer to the classes BigGridTable and NumericGridEditor.

Definition at line 1546 of file Grid.cs.


Constructor & Destructor Documentation

wx.SampleGrid.BigGridFrame.BigGridFrame ( long  sizeGrid  ) 

Definition at line 1551 of file Grid.cs.

01552                         : base(null, -1, "Plugin Virtual Table", wxDefaultPosition, new Size( 500, 450 ) )
01553                 {
01554                         Icon = new wx.Icon( "../Samples/Grid/mondrian.png" );
01555 
01556                         m_grid = new Grid( this, -1, wxDefaultPosition, wxDefaultSize );
01557                         m_grid.SetDefaultRowSize(2*m_grid.GetRowHeight(0), true);
01558                         m_grid.SetDefaultCellAlignment((int)Alignment.wxALIGN_CENTRE, (int)Alignment.wxALIGN_CENTRE );
01559                         wx.Font labelFont=m_grid.LabelFont;
01560                         int x=0;
01561                         int y=0;
01562                         int descent;
01563                         int externalLeading;
01564                         m_grid.GetTextExtent("(22) Label888", out x, out y, out descent, out externalLeading, labelFont);
01565             y *= 2;
01566                         m_grid.ColLabelSize=y+5; // larger, since two lines
01567                         m_grid.SetDefaultColSize(x+5, false);
01568             m_grid.RegisterDataType("num8888", new wx.GridCtrl.Renderers.GridCellStringRenderer(), new NumericGridEditor(0, 8888));
01569             m_grid.RegisterDataType("text", new wx.GridCtrl.Renderers.GridCellAutoWrapStringRenderer(), new wx.GridCtrl.Editors.GridCellAutoWrapStringEditor());
01570                         m_grid.SetCellEditor(1, 1, new NumericGridEditor(10, 20));
01571                         m_table = new BigGridTable( sizeGrid );
01572                         m_grid.SetTable( m_table, true );
01573                 }


Manual of the wx.NET   (c) 2003-2010 the wx.NET project