Public Member Functions | |
| void | About (object sender, Event e) |
| void | AutoSizeCols (object sender, Event e) |
| void | CellOverflow (object sender, Event e) |
| void | ClearGrid (object sender, Event e) |
| void | DeleteSelectedCols (object sender, Event e) |
| void | DeleteSelectedRows (object sender, Event e) |
| void | DeselectAll (object sender, Event e) |
| void | DeselectCell (object sender, Event e) |
| void | DeselectCol (object sender, Event e) |
| void | DeselectRow (object sender, Event e) |
| GridFrame () | |
| void | InsertCol (object sender, Event e) |
| void | InsertRow (object sender, Event e) |
| void | OnAddToSelectToggle (object sender, Event e) |
| void | OnBugsTable (object sender, Event e) |
| void | OnCellLeftClick (object sender, Event e) |
| void | OnCellValueChanged (object sender, Event e) |
| void | OnColSize (object sender, Event e) |
| void | OnEditorHidden (object sender, Event e) |
| void | OnEditorShown (object sender, Event e) |
| void | OnLabelLeftClick (object sender, Event e) |
| void | OnQuit (object sender, Event e) |
| void | OnRangeSelected (object sender, Event e) |
| void | OnRowSize (object sender, Event e) |
| void | OnSelectCell (object sender, Event e) |
| void | OnSetHighlightWidth (object sender, Event e) |
| void | OnSetROHighlightWidth (object sender, Event e) |
| void | OnSmallGrid (object sender, Event e) |
| void | OnVTable (object sender, Event e) |
| void | ResizeCell (object sender, Event e) |
| void | SelectAll (object sender, Event e) |
| void | SelectCell (object sender, Event e) |
| void | SelectCells (object sender, Event e) |
| void | SelectCol (object sender, Event e) |
| void | SelectCols (object sender, Event e) |
| void | SelectRow (object sender, Event e) |
| void | SelectRows (object sender, Event e) |
| void | SetCellBgColour (object sender, Event e) |
| void | SetCellFgColour (object sender, Event e) |
| void | SetColLabelHorizAlignment (object sender, Event e) |
| void | SetColLabelVertAlignment (object sender, Event e) |
| void | SetDefaults () |
| void | SetGridLineColour (object sender, Event e) |
| void | SetLabelColour (object sender, Event e) |
| void | SetLabelFont (object sender, Event e) |
| void | SetLabelTextColour (object sender, Event e) |
| void | SetRowLabelHorizAlignment (object sender, Event e) |
| void | SetRowLabelVertAlignment (object sender, Event e) |
| void | ToggleColLabels (object sender, Event e) |
| void | ToggleColSizing (object sender, Event e) |
| void | ToggleEditing (object sender, Event e) |
| void | ToggleGridLines (object sender, Event e) |
| void | ToggleGridSizing (object sender, Event e) |
| void | ToggleRowLabels (object sender, Event e) |
| void | ToggleRowSizing (object sender, Event e) |
Public Attributes | |
| bool | m_addToSel = false |
Static Public Attributes | |
| static long | s_sizeGrid = 10000 |
Definition at line 34 of file Grid.cs.
| wx.SampleGrid.GridFrame.GridFrame | ( | ) |
Definition at line 102 of file Grid.cs.
References About.
00103 : base( null, -1, "wxWidgets grid class demo", wxDefaultPosition, wxDefaultSize ) 00104 { 00105 Icon = new wx.Icon( "../Samples/Grid/mondrian.png" ); 00106 00107 int gridW = 600; 00108 int gridH = 300; 00109 int logW = gridW; 00110 int logH = 100; 00111 00112 Menu fileMenu = new Menu(); 00113 fileMenu.Append( (int)Cmd.ID_VTABLE, "&Virtual table test\tCtrl-V" ); 00114 fileMenu.Append( (int)Cmd.ID_BUGS_TABLE, "&Bugs table test\tCtrl-B" ); 00115 fileMenu.Append( (int)Cmd.ID_SMALL_GRID, "&Small Grid test\tCtrl-S" ); 00116 fileMenu.AppendSeparator(); 00117 fileMenu.Append( (int)Cmd.ID_EXIT, "E&xit\tAlt-X" ); 00118 00119 Menu viewMenu = new Menu(); 00120 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLEROWLABELS, "&Row labels", "" ); 00121 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLECOLLABELS, "&Col labels", "" ); 00122 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLEEDIT, "&Editable", "" ); 00123 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLEROWSIZING, "Ro&w drag-resize", "" ); 00124 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLECOLSIZING, "C&ol drag-resize", "" ); 00125 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLEGRIDSIZING, "&Grid drag-resize", "" ); 00126 viewMenu.AppendCheckItem( (int)Cmd.ID_TOGGLEGRIDLINES, "&Grid Lines", "" ); 00127 viewMenu.Append( (int)Cmd.ID_SET_HIGHLIGHT_WIDTH, "&Set Cell Highlight Width...", "" ); 00128 viewMenu.Append( (int)Cmd.ID_SET_RO_HIGHLIGHT_WIDTH, "&Set Cell RO Highlight Width...", "" ); 00129 viewMenu.Append( (int)Cmd.ID_AUTOSIZECOLS, "&Auto-size cols" ); 00130 viewMenu.AppendCheckItem( (int)Cmd.ID_CELLOVERFLOW, "&Overflow cells", "" ); 00131 viewMenu.AppendCheckItem( (int)Cmd.ID_RESIZECELL, "&Resize cell (7,1)", "" ); 00132 00133 Menu rowLabelMenu = new Menu(); 00134 00135 viewMenu.Append( (int)Cmd.ID_ROWLABELALIGN, "R&ow label alignment", rowLabelMenu, "Change alignment of row labels" ); 00136 00137 rowLabelMenu.Append( (int)Cmd.ID_ROWLABELHORIZALIGN, "&Horizontal" ); 00138 rowLabelMenu.Append( (int)Cmd.ID_ROWLABELVERTALIGN, "&Vertical" ); 00139 00140 Menu colLabelMenu = new Menu(); 00141 00142 viewMenu.Append( (int)Cmd.ID_COLLABELALIGN, "Col l&abel alignment", colLabelMenu, "Change alignment of col labels" ); 00143 00144 colLabelMenu.Append( (int)Cmd.ID_COLLABELHORIZALIGN, "&Horizontal" ); 00145 colLabelMenu.Append( (int)Cmd.ID_COLLABELVERTALIGN, "&Vertical" ); 00146 00147 Menu colMenu = new Menu(); 00148 colMenu.Append( (int)Cmd.ID_SETLABELCOLOUR, "Set &label colour..." ); 00149 colMenu.Append( (int)Cmd.ID_SETLABELTEXTCOLOUR, "Set label &text colour..." ); 00150 colMenu.Append( (int)Cmd.ID_SETLABEL_FONT, "Set label fo&nt..." ); 00151 colMenu.Append( (int)Cmd.ID_GRIDLINECOLOUR, "&Grid line colour..." ); 00152 colMenu.Append( (int)Cmd.ID_SET_CELL_FG_COLOUR, "Set cell &foreground colour..." ); 00153 colMenu.Append( (int)Cmd.ID_SET_CELL_BG_COLOUR, "Set cell &background colour..." ); 00154 00155 Menu editMenu = new Menu(); 00156 editMenu.Append( (int)Cmd.ID_INSERTROW, "Insert &row" ); 00157 editMenu.Append( (int)Cmd.ID_INSERTCOL, "Insert &column" ); 00158 editMenu.Append( (int)Cmd.ID_DELETEROW, "Delete selected ro&ws" ); 00159 editMenu.Append( (int)Cmd.ID_DELETECOL, "Delete selected co&ls" ); 00160 editMenu.Append( (int)Cmd.ID_CLEARGRID, "Cl&ear grid cell contents" ); 00161 00162 Menu selectMenu = new Menu(); 00163 selectMenu.AppendCheckItem( (int)Cmd.ID_SELECT_UNSELECT, "Add new cells to the selection", 00164 "When off, old selection is deselected before selecting the new cells" ); 00165 selectMenu.Append( (int)Cmd.ID_SELECT_ALL, "Select all" ); 00166 selectMenu.Append( (int)Cmd.ID_SELECT_ROW, "Select row 2" ); 00167 selectMenu.Append( (int)Cmd.ID_SELECT_COL, "Select col 2" ); 00168 selectMenu.Append( (int)Cmd.ID_SELECT_CELL, "Select cell (3, 1)" ); 00169 selectMenu.Append( (int)Cmd.ID_DESELECT_ALL, "Deselect all" ); 00170 selectMenu.Append( (int)Cmd.ID_DESELECT_ROW, "Deselect row 2" ); 00171 selectMenu.Append( (int)Cmd.ID_DESELECT_COL, "Deselect col 2" ); 00172 selectMenu.Append( (int)Cmd.ID_DESELECT_CELL, "Deselect cell (3, 1)" ); 00173 00174 Menu selectionMenu = new Menu(); 00175 selectMenu.Append( (int)Cmd.ID_CHANGESEL, "Change &selection mode", selectionMenu, "Change selection mode" ); 00176 00177 selectionMenu.Append( (int)Cmd.ID_SELCELLS, "Select &Cells" ); 00178 selectionMenu.Append( (int)Cmd.ID_SELROWS, "Select &Rows" ); 00179 selectionMenu.Append( (int)Cmd.ID_SELCOLS, "Select C&ols" ); 00180 00181 00182 Menu helpMenu = new Menu(); 00183 helpMenu.Append( (int)Cmd.ID_ABOUT, "&About wxGrid demo" ); 00184 00185 wx.MenuBar menuBar = new wx.MenuBar(); 00186 menuBar.Append( fileMenu, "&File" ); 00187 menuBar.Append( viewMenu, "&View" ); 00188 menuBar.Append( colMenu, "&Colours" ); 00189 menuBar.Append( editMenu, "&Edit" ); 00190 menuBar.Append( selectMenu, "&Select" ); 00191 menuBar.Append( helpMenu, "&Help" ); 00192 00193 MenuBar = menuBar ; 00194 00195 grid = new Grid( this, -1, new Point( 0, 0 ), new Size( 400, 300 ) ); 00196 00197 logWin = new TextCtrl(this, -1, "", new Point(0, gridH + 20), new Size(logW, logH), wx.WindowStyles.TE_MULTILINE); 00198 00199 Log.SetActiveTarget( logWin ); 00200 00201 grid.CreateGrid( 0, 0 ); 00202 grid.AppendRows( 100 ); 00203 grid.AppendCols( 100 ); 00204 00205 int ir = grid.NumberRows; 00206 grid.DeleteRows( 0, ir ); 00207 grid.AppendRows( ir ); 00208 00209 grid.SetRowSize( 0, 60 ); 00210 grid.SetCellValue( 0, 0, "Ctrl+Home\nwill go to\nthis cell" ); 00211 00212 grid.SetCellValue( 0, 1, "A long piece of text to demonstrate wrapping." ); 00213 grid.SetCellRenderer(0, 1, new wx.GridCtrl.Renderers.GridCellAutoWrapStringRenderer()); 00214 grid.SetCellEditor(0, 1, new wx.GridCtrl.Editors.GridCellAutoWrapStringEditor()); 00215 00216 grid.SetCellValue( 0, 2, "Blah" ); 00217 grid.SetCellValue( 0, 3, "Read only" ); 00218 grid.SetReadOnly( 0, 3 ); 00219 00220 grid.SetCellValue( 0, 4, "Can veto edit this cell" ); 00221 00222 grid.SetCellValue( 0, 5, "Press\nCtrl+arrow\nto skip over\ncells" ); 00223 00224 grid.SetRowSize( 99, 60 ); 00225 grid.SetCellValue( 99, 99, "Ctrl+End\nwill go to\nthis cell" ); 00226 grid.SetCellValue( 1, 0, "This default cell will overflow into neighboring cells, but not if you turn overflow off." ); 00227 00228 grid.SetCellTextColour( 1, 2, Colour.wxRED ); 00229 grid.SetCellBackgroundColour( 1, 2, Colour.wxGREEN ); 00230 00231 grid.SetCellValue( 1, 4, "I'm in the middle" ); 00232 00233 grid.SetCellValue( 2, 2, "red" ); 00234 00235 grid.SetCellTextColour( 2, 2, Colour.wxRED ); 00236 grid.SetCellValue( 3, 3, "green on grey" ); 00237 grid.SetCellTextColour( 3, 3, Colour.wxGREEN ); 00238 grid.SetCellBackgroundColour( 3, 3, Colour.wxLIGHT_GREY ); 00239 00240 grid.SetCellValue( 4, 4, "a weird looking cell" ); 00241 grid.SetCellAlignment( 4, 4, (int)Alignment.wxALIGN_CENTRE, (int)Alignment.wxALIGN_CENTRE ); 00242 grid.SetCellRenderer( 4, 4, new MyGridCellRenderer() ); 00243 00244 grid.SetCellValue( 3, 0, "" ); 00245 grid.SetCellRenderer(3, 0, new wx.GridCtrl.Renderers.GridCellBoolRenderer()); 00246 grid.SetCellEditor(3, 0, new wx.GridCtrl.Editors.GridCellBoolEditor()); 00247 00248 grid.SetCellValue(3, 4, DateTime.Now.ToString()); 00249 grid.SetCellEditor(3, 4, new wx.GridCtrl.Editors.GridCellDateTimeEditor("%d ({ddd}) {HH}:{mm}", new DateTime(1967, 9, 27), new DateTime(2050, 9, 27), false)); 00250 grid.SetCellRenderer(3, 4, new wx.GridCtrl.Renderers.GridCellDateTimeMaskRenderer("%d ({ddd}) {HH}:{mm}")); 00251 00252 GridCellAttr attr = new GridCellAttr(); 00253 attr.TextColour = Colour.wxBLUE; 00254 grid.SetColAttr( 5, attr ); 00255 attr = new GridCellAttr(); 00256 attr.BackgroundColour = Colour.wxRED; 00257 grid.SetRowAttr( 5, attr ); 00258 00259 grid.SetCellValue( 2, 4, "a wider column" ); 00260 grid.SetColSize( 4, 200 ); 00261 grid.SetColMinimalWidth( 4, 200 ); 00262 00263 grid.SetCellTextColour( 5, 8, Colour.wxGREEN ); 00264 grid.SetCellValue( 5, 8, "Bg from row attr\nText col from cell attr" ); 00265 grid.SetCellValue( 5, 5, "Bg from row attr Text col from col attr and this text is so long that it covers over many many empty cells but is broken by one that isn't" ); 00266 00267 grid.SetColFormatFloat( 6 ); 00268 grid.SetCellValue( 0, 6, "3.1415" ); 00269 grid.SetCellValue( 1, 6, "1415" ); 00270 grid.SetCellValue( 2, 6, "12345.67890" ); 00271 00272 grid.SetColFormatFloat( 7, 6, 2 ); 00273 grid.SetCellValue( 0, 7, "3.1415" ); 00274 grid.SetCellValue( 1, 7, "1415" ); 00275 grid.SetCellValue( 2, 7, "12345.67890" ); 00276 00277 string[] choices = 00278 { 00279 "Please select a choice", 00280 "This takes two cells", 00281 "Another choice" 00282 }; 00283 00284 grid.SetCellEditor(4, 0, new wx.GridCtrl.Editors.GridCellChoiceEditor(choices)); 00285 grid.SetCellSize( 4, 0, 1, 2 ); 00286 grid.SetCellValue( 4, 0, choices[0] ); 00287 grid.SetCellOverflow( 4, 0, false ); 00288 00289 grid.SetCellSize( 7, 1, 3, 4 ); 00290 grid.SetCellAlignment( 7, 1, (int)Alignment.wxALIGN_CENTRE, (int)Alignment.wxALIGN_CENTRE ); 00291 grid.SetCellValue( 7, 1, "Big box!" ); 00292 00293 BoxSizer topSizer = new BoxSizer( Orientation.wxVERTICAL ); 00294 topSizer.Add( grid, 1, wx.SizerFlag.wxEXPAND ); 00295 00296 topSizer.Add( logWin, 0, wx.SizerFlag.wxEXPAND ); 00297 00298 AutoLayout = true; 00299 Sizer = topSizer ; 00300 00301 topSizer.Fit( this ); 00302 topSizer.SetSizeHints( this ); 00303 00304 Centre(); 00305 SetDefaults(); 00306 00307 EVT_MENU( (int)Cmd.ID_TOGGLEROWLABELS, new EventListener( ToggleRowLabels ) ); 00308 EVT_MENU( (int)Cmd.ID_TOGGLECOLLABELS, new EventListener( ToggleColLabels ) ); 00309 EVT_MENU( (int)Cmd.ID_TOGGLEEDIT, new EventListener( ToggleEditing ) ); 00310 EVT_MENU( (int)Cmd.ID_TOGGLEROWSIZING, new EventListener( ToggleRowSizing ) ); 00311 EVT_MENU( (int)Cmd.ID_TOGGLECOLSIZING, new EventListener( ToggleColSizing ) ); 00312 EVT_MENU( (int)Cmd.ID_TOGGLEGRIDSIZING, new EventListener( ToggleGridSizing ) ); 00313 EVT_MENU( (int)Cmd.ID_TOGGLEGRIDLINES, new EventListener( ToggleGridLines ) ); 00314 EVT_MENU( (int)Cmd.ID_AUTOSIZECOLS, new EventListener( AutoSizeCols ) ); 00315 EVT_MENU( (int)Cmd.ID_CELLOVERFLOW, new EventListener( CellOverflow ) ); 00316 EVT_MENU( (int)Cmd.ID_RESIZECELL, new EventListener( ResizeCell ) ); 00317 EVT_MENU( (int)Cmd.ID_SETLABELCOLOUR, new EventListener( SetLabelColour ) ); 00318 EVT_MENU( (int)Cmd.ID_SETLABELTEXTCOLOUR, new EventListener( SetLabelTextColour ) ); 00319 EVT_MENU( (int)Cmd.ID_SETLABEL_FONT, new EventListener( SetLabelFont ) ); 00320 EVT_MENU( (int)Cmd.ID_ROWLABELHORIZALIGN, new EventListener( SetRowLabelHorizAlignment ) ); 00321 EVT_MENU( (int)Cmd.ID_ROWLABELVERTALIGN, new EventListener( SetRowLabelVertAlignment ) ); 00322 EVT_MENU( (int)Cmd.ID_COLLABELHORIZALIGN, new EventListener( SetColLabelHorizAlignment ) ); 00323 EVT_MENU( (int)Cmd.ID_COLLABELVERTALIGN, new EventListener( SetColLabelVertAlignment ) ); 00324 EVT_MENU( (int)Cmd.ID_GRIDLINECOLOUR, new EventListener( SetGridLineColour ) ); 00325 EVT_MENU( (int)Cmd.ID_INSERTROW, new EventListener( InsertRow ) ); 00326 EVT_MENU( (int)Cmd.ID_INSERTCOL, new EventListener( InsertCol ) ); 00327 EVT_MENU( (int)Cmd.ID_DELETEROW, new EventListener( DeleteSelectedRows ) ); 00328 EVT_MENU( (int)Cmd.ID_DELETECOL, new EventListener( DeleteSelectedCols ) ); 00329 EVT_MENU( (int)Cmd.ID_CLEARGRID, new EventListener( ClearGrid ) ); 00330 EVT_MENU( (int)Cmd.ID_SELCELLS, new EventListener( SelectCells ) ); 00331 EVT_MENU( (int)Cmd.ID_SELROWS, new EventListener( SelectRows ) ); 00332 EVT_MENU( (int)Cmd.ID_SELCOLS, new EventListener( SelectCols ) ); 00333 00334 EVT_MENU( (int)Cmd.ID_SET_CELL_FG_COLOUR, new EventListener( SetCellFgColour ) ); 00335 EVT_MENU( (int)Cmd.ID_SET_CELL_BG_COLOUR, new EventListener( SetCellBgColour ) ); 00336 00337 EVT_MENU( (int)Cmd.ID_ABOUT, new EventListener( About ) ); 00338 EVT_MENU( (int)Cmd.ID_EXIT, new EventListener( OnQuit ) ); 00339 EVT_MENU( (int)Cmd.ID_VTABLE, new EventListener( OnVTable) ); 00340 EVT_MENU( (int)Cmd.ID_BUGS_TABLE, new EventListener( OnBugsTable) ); 00341 EVT_MENU( (int)Cmd.ID_SMALL_GRID, new EventListener( OnSmallGrid) ); 00342 00343 EVT_MENU( (int)Cmd.ID_DESELECT_CELL, new EventListener( DeselectCell) ); 00344 EVT_MENU( (int)Cmd.ID_DESELECT_COL, new EventListener( DeselectCol) ); 00345 EVT_MENU( (int)Cmd.ID_DESELECT_ROW, new EventListener( DeselectRow) ); 00346 EVT_MENU( (int)Cmd.ID_DESELECT_ALL, new EventListener( DeselectAll) ); 00347 EVT_MENU( (int)Cmd.ID_SELECT_CELL, new EventListener( SelectCell) ); 00348 EVT_MENU( (int)Cmd.ID_SELECT_COL, new EventListener( SelectCol) ); 00349 EVT_MENU( (int)Cmd.ID_SELECT_ROW, new EventListener( SelectRow) ); 00350 EVT_MENU( (int)Cmd.ID_SELECT_ALL, new EventListener( SelectAll) ); 00351 EVT_MENU( (int)Cmd.ID_SELECT_UNSELECT, new EventListener( OnAddToSelectToggle) ); 00352 00353 EVT_MENU( (int)Cmd.ID_SET_HIGHLIGHT_WIDTH, new EventListener( OnSetHighlightWidth) ); 00354 EVT_MENU( (int)Cmd.ID_SET_RO_HIGHLIGHT_WIDTH, new EventListener( OnSetROHighlightWidth) ); 00355 00356 EVT_GRID_LABEL_LEFT_CLICK( new EventListener( OnLabelLeftClick ) ); 00357 EVT_GRID_CELL_LEFT_CLICK( new EventListener( OnCellLeftClick ) ); 00358 EVT_GRID_ROW_SIZE( new EventListener( OnRowSize ) ); 00359 EVT_GRID_COL_SIZE( new EventListener( OnColSize ) ); 00360 EVT_GRID_SELECT_CELL( new EventListener( OnSelectCell ) ); 00361 EVT_GRID_RANGE_SELECT( new EventListener( OnRangeSelected ) ); 00362 EVT_GRID_CELL_CHANGE( new EventListener( OnCellValueChanged ) ); 00363 00364 EVT_GRID_EDITOR_SHOWN( new EventListener( OnEditorShown ) ); 00365 EVT_GRID_EDITOR_HIDDEN( new EventListener( OnEditorHidden ) ); 00366 00367 }
| void wx.SampleGrid.GridFrame.About | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 689 of file Grid.cs.
00690 { 00691 wx.MessageDialog.ShowModal( "\n\nwxGrid demo \n\n" + 00692 "Ported to wx.NET \nby\n" + 00693 "Alexander Olk\n" + 00694 "Extended for testing wrapped grid editors \nby\n" + 00695 "Harald Meyer auf'm Hofe\n", 00696 "About", 00697 wx.WindowStyles.DIALOG_OK ); 00698 }
| void wx.SampleGrid.GridFrame.AutoSizeCols | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.CellOverflow | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ClearGrid | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeleteSelectedCols | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeleteSelectedRows | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeselectAll | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeselectCell | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeselectCol | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.DeselectRow | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.InsertCol | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.InsertRow | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnAddToSelectToggle | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 775 of file Grid.cs.
00776 { 00777 CommandEvent ce = (CommandEvent) e; 00778 m_addToSel = ce.IsChecked; 00779 }
| void wx.SampleGrid.GridFrame.OnBugsTable | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnCellLeftClick | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 837 of file Grid.cs.
00838 { 00839 GridEvent ge = (GridEvent) e; 00840 logBuf = "Left click at row " + ge.Row + " col " + ge.Col; 00841 Log.LogMessage( logBuf ); 00842 00843 // you must call event skip if you want default grid processing 00844 // (cell highlighting etc.) 00845 00846 ge.Skip(); 00847 }
| void wx.SampleGrid.GridFrame.OnCellValueChanged | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnColSize | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnEditorHidden | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 944 of file Grid.cs.
00945 { 00946 GridEvent ge = (GridEvent) e; 00947 if ( ( ge.Col == 4 ) && 00948 ( ge.Row == 0 ) && 00949 ( wx.MessageDialog.ShowModal( "Are you sure you wish to finish editing this cell", 00950 "Checking", wx.WindowStyles.DIALOG_YES_NO) == wx.ShowModalResult.NO) ) 00951 { 00952 00953 ge.Veto(); 00954 return; 00955 } 00956 00957 Log.LogMessage( "Cell editor hidden." ); 00958 00959 ge.Skip(); 00960 }
| void wx.SampleGrid.GridFrame.OnEditorShown | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 926 of file Grid.cs.
00927 { 00928 GridEvent ge = (GridEvent) e; 00929 if ( ( ge.Col == 4 ) && 00930 ( ge.Row == 0 ) && 00931 ( wx.MessageDialog.ShowModal( "Are you sure you wish to edit this cell", 00932 "Checking", wx.WindowStyles.DIALOG_YES_NO) == wx.ShowModalResult.NO) ) 00933 { 00934 00935 ge.Veto(); 00936 return; 00937 } 00938 00939 Log.LogMessage( "Cell editor shown." ); 00940 00941 ge.Skip(); 00942 }
| void wx.SampleGrid.GridFrame.OnLabelLeftClick | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 811 of file Grid.cs.
00812 { 00813 GridEvent ge = (GridEvent) e; 00814 00815 if ( ge.Row != -1 ) 00816 { 00817 logBuf = "Left click on row label " + ge.Row; 00818 } 00819 else if ( ge.Col != -1 ) 00820 { 00821 logBuf += "Left click on col label " + ge.Col; 00822 } 00823 else 00824 { 00825 logBuf += "Left click on corner label"; 00826 } 00827 00828 if ( ge.ShiftDown ) logBuf += " (shift down)"; 00829 if ( ge.ControlDown ) logBuf += " (control down)"; 00830 Log.LogMessage( logBuf ); 00831 00832 // you must call event skip if you want default grid processing 00833 00834 ge.Skip(); 00835 }
| void wx.SampleGrid.GridFrame.OnQuit | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnRangeSelected | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 890 of file Grid.cs.
00891 { 00892 GridRangeSelectEvent ge = (GridRangeSelectEvent) e; 00893 00894 if ( ge.Selecting ) 00895 logBuf = "Selected "; 00896 else 00897 logBuf = "Deselected "; 00898 00899 logBuf += "cells from row " + ge.TopRow + 00900 " col " + ge.LeftCol + 00901 " to row " + ge.BottomRow + 00902 " col " + ge.RightCol + 00903 " ( ControlDown: " + (ge.ControlDown ? 'T':'F') + 00904 ", ShiftDown: " + (ge.ShiftDown ? 'T':'F') + 00905 ", AltDown: " + (ge.AltDown ? 'T':'F') + 00906 ", MetaDown: " + (ge.MetaDown ? 'T':'F') + " )"; 00907 00908 Log.LogMessage( logBuf ); 00909 00910 ge.Skip(); 00911 }
| void wx.SampleGrid.GridFrame.OnRowSize | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.OnSelectCell | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 867 of file Grid.cs.
00868 { 00869 GridEvent ge = (GridEvent) e; 00870 if ( ge.Selecting ) 00871 logBuf = "Selected "; 00872 else 00873 logBuf = "Deselected "; 00874 00875 logBuf += "cell at row " + ge.Row + 00876 " col " + ge.Col + 00877 " ( ControlDown: " + ( ge.ControlDown ? 'T':'F' ) + 00878 ", ShiftDown: " + (ge.ShiftDown ? 'T':'F') + 00879 ", AltDown: " + (ge.AltDown ? 'T':'F') + 00880 ", MetaDown: " + (ge.MetaDown ? 'T':'F') + " )"; 00881 00882 Log.LogMessage( logBuf ); 00883 Log.LogMessage("Now {0} managed and {1} unmanaged instances.", Object.SavedInstancesCount, Object.InstancesCount); 00884 00885 // you must call Skip() if you want the default processing 00886 // to occur in wxGrid 00887 ge.Skip(); 00888 }
| void wx.SampleGrid.GridFrame.OnSetHighlightWidth | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 781 of file Grid.cs.
00782 { 00783 string[] choices = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; 00784 00785 SingleChoiceDialog dlg = new SingleChoiceDialog(this, "Choose the thickness of the highlight pen:", 00786 "Pen Width", choices); 00787 00788 int current = grid.CellHighlightPenWidth; 00789 dlg.SetSelection( current ); 00790 if (dlg.ShowModal() == wx.ShowModalResult.OK) 00791 { 00792 grid.CellHighlightPenWidth = dlg.GetSelection(); 00793 } 00794 }
| void wx.SampleGrid.GridFrame.OnSetROHighlightWidth | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 796 of file Grid.cs.
00797 { 00798 string[] choices = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; 00799 00800 SingleChoiceDialog dlg = new SingleChoiceDialog(this, "Choose the thickness of the highlight pen:", 00801 "Pen Width", choices); 00802 00803 int current = grid.CellHighlightROPenWidth; 00804 dlg.SetSelection( current ); 00805 if (dlg.ShowModal() == wx.ShowModalResult.OK) 00806 { 00807 grid.CellHighlightROPenWidth = dlg.GetSelection(); 00808 } 00809 }
| void wx.SampleGrid.GridFrame.OnSmallGrid | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 726 of file Grid.cs.
00727 { 00728 Frame frame = new Frame( null, -1, "A Small Grid", wxDefaultPosition, new Size( 640, 480 ) ); 00729 Panel panel = new Panel( frame, -1 ); 00730 Grid agrid = new Grid(panel, -1, new Point(10, 10), new Size(400, 400), wx.WindowStyles.WANTS_CHARS | wx.WindowStyles.BORDER_SIMPLE); 00731 agrid.CreateGrid( 3, 3 ); 00732 frame.Show( true ); 00733 }
| void wx.SampleGrid.GridFrame.OnVTable | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 705 of file Grid.cs.
00706 { 00707 s_sizeGrid = GetNumberFromUser( "Size of the table to create", 00708 "Size: ", 00709 "wxGridDemo question", 00710 (int)s_sizeGrid, 00711 0, 32000, this); 00712 00713 if ( s_sizeGrid != -1 ) 00714 { 00715 BigGridFrame win = new BigGridFrame( s_sizeGrid ); 00716 win.Show( true ); 00717 } 00718 }
| void wx.SampleGrid.GridFrame.ResizeCell | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectAll | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectCell | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 755 of file Grid.cs.
00756 { 00757 grid.SelectBlock( 3, 1, 3, 1, m_addToSel ); 00758 }
| void wx.SampleGrid.GridFrame.SelectCells | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectCol | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectCols | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectRow | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SelectRows | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SetCellBgColour | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 672 of file Grid.cs.
00673 { 00674 ColourDialog dlg = new ColourDialog( null ); 00675 if (dlg.ShowModal() == wx.ShowModalResult.OK) 00676 { 00677 ColourData retData = dlg.ColourData; 00678 Colour colour = retData.Colour; 00679 00680 if ( colour.Ok() ) 00681 { 00682 grid.DefaultCellBackgroundColour = colour; 00683 Rectangle r = new Rectangle( 0, 0, grid.Size.Width, grid.Size.Height ); 00684 grid.Refresh( true, r); 00685 } 00686 } 00687 }
| void wx.SampleGrid.GridFrame.SetCellFgColour | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 656 of file Grid.cs.
00657 { 00658 ColourDialog dlg = new ColourDialog( null ); 00659 if (dlg.ShowModal() == wx.ShowModalResult.OK) 00660 { 00661 ColourData retData = dlg.ColourData; 00662 Colour colour = retData.Colour; 00663 00664 if ( colour.Ok() ) 00665 { 00666 grid.DefaultCellTextColour = colour; 00667 grid.Refresh(); 00668 } 00669 } 00670 }
| void wx.SampleGrid.GridFrame.SetColLabelHorizAlignment | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 541 of file Grid.cs.
00542 { 00543 Alignment[] align = grid.GetColLabelAlignment(); 00544 00545 switch ( align[0] ) 00546 { 00547 case Alignment.wxALIGN_LEFT: 00548 align[0] = Alignment.wxALIGN_CENTRE; 00549 break; 00550 00551 case Alignment.wxALIGN_CENTRE: 00552 align[0] = Alignment.wxALIGN_RIGHT; 00553 break; 00554 00555 case Alignment.wxALIGN_RIGHT: 00556 align[0] = Alignment.wxALIGN_LEFT; 00557 break; 00558 } 00559 00560 grid.SetColLabelAlignment(align[0], align[1]); 00561 }
| void wx.SampleGrid.GridFrame.SetColLabelVertAlignment | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 563 of file Grid.cs.
00564 { 00565 Alignment[] align = grid.GetColLabelAlignment(); 00566 00567 switch ( align[1] ) 00568 { 00569 case Alignment.wxALIGN_TOP: 00570 align[1] = Alignment.wxALIGN_CENTRE; 00571 break; 00572 00573 case Alignment.wxALIGN_CENTRE: 00574 align[1] = Alignment.wxALIGN_BOTTOM; 00575 break; 00576 00577 case Alignment.wxALIGN_BOTTOM: 00578 align[1] = Alignment.wxALIGN_TOP; 00579 break; 00580 } 00581 00582 grid.SetColLabelAlignment(align[0], align[1]); 00583 }
| void wx.SampleGrid.GridFrame.SetDefaults | ( | ) |
Definition at line 369 of file Grid.cs.
00370 { 00371 MenuBar.Check( (int)Cmd.ID_TOGGLEROWLABELS, true ); 00372 MenuBar.Check( (int)Cmd.ID_TOGGLECOLLABELS, true ); 00373 MenuBar.Check( (int)Cmd.ID_TOGGLEEDIT, true ); 00374 MenuBar.Check( (int)Cmd.ID_TOGGLEROWSIZING, true ); 00375 MenuBar.Check( (int)Cmd.ID_TOGGLECOLSIZING, true ); 00376 MenuBar.Check( (int)Cmd.ID_TOGGLEGRIDSIZING, true ); 00377 MenuBar.Check( (int)Cmd.ID_TOGGLEGRIDLINES, true ); 00378 MenuBar.Check( (int)Cmd.ID_CELLOVERFLOW, true ); 00379 }
| void wx.SampleGrid.GridFrame.SetGridLineColour | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SetLabelColour | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 456 of file Grid.cs.
00457 { 00458 ColourDialog dlg = new ColourDialog( null ); 00459 if (dlg.ShowModal() == wx.ShowModalResult.OK) 00460 { 00461 ColourData retData = dlg.ColourData; 00462 Colour colour = retData.Colour; 00463 00464 grid.LabelBackgroundColour = colour; 00465 } 00466 }
| void wx.SampleGrid.GridFrame.SetLabelFont | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 480 of file Grid.cs.
00481 { 00482 FontData data = new FontData(); 00483 data.InitialFont = grid.LabelFont; 00484 00485 FontDialog fd = new FontDialog(this, data); 00486 00487 if (fd.ShowModal() == wx.ShowModalResult.OK) 00488 { 00489 Font font = fd.FontData.ChosenFont; 00490 if ( font.Ok ) 00491 { 00492 grid.LabelFont = font; 00493 } 00494 } 00495 00496 }
| void wx.SampleGrid.GridFrame.SetLabelTextColour | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.SetRowLabelHorizAlignment | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 498 of file Grid.cs.
00499 { 00500 Alignment[] currentAlignment=grid.GetRowLabelAlignment(); 00501 00502 switch ( currentAlignment[0] ) 00503 { 00504 case Alignment.wxALIGN_LEFT: 00505 currentAlignment[0] = Alignment.wxALIGN_CENTRE; 00506 break; 00507 00508 case Alignment.wxALIGN_CENTRE: 00509 currentAlignment[0] = Alignment.wxALIGN_RIGHT; 00510 break; 00511 00512 case Alignment.wxALIGN_RIGHT: 00513 currentAlignment[0] = Alignment.wxALIGN_LEFT; 00514 break; 00515 } 00516 00517 grid.SetRowLabelAlignment(currentAlignment[0], currentAlignment[1]); 00518 }
| void wx.SampleGrid.GridFrame.SetRowLabelVertAlignment | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 520 of file Grid.cs.
00521 { 00522 Alignment[] align=grid.GetRowLabelAlignment(); 00523 switch ( align[1] ) 00524 { 00525 case Alignment.wxALIGN_TOP: 00526 align[1] = Alignment.wxALIGN_CENTRE; 00527 break; 00528 00529 case Alignment.wxALIGN_CENTRE: 00530 align[1] = Alignment.wxALIGN_BOTTOM; 00531 break; 00532 00533 case Alignment.wxALIGN_BOTTOM: 00534 align[1] = Alignment.wxALIGN_TOP; 00535 break; 00536 } 00537 00538 grid.SetRowLabelAlignment(align[0], align[1]); 00539 }
| void wx.SampleGrid.GridFrame.ToggleColLabels | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ToggleColSizing | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ToggleEditing | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 405 of file Grid.cs.
References ID_TOGGLEEDIT.
00406 { 00407 grid.IsEditable = MenuBar.IsChecked( (int)Cmd. ID_TOGGLEEDIT ); 00408 }
| void wx.SampleGrid.GridFrame.ToggleGridLines | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ToggleGridSizing | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ToggleRowLabels | ( | object | sender, | |
| Event | e | |||
| ) |
| void wx.SampleGrid.GridFrame.ToggleRowSizing | ( | object | sender, | |
| Event | e | |||
| ) |
| bool wx.SampleGrid.GridFrame.m_addToSel = false |
long wx.SampleGrid.GridFrame.s_sizeGrid = 10000 [static] |
(c) 2003-2010 the wx.NET project