1wxGrid(3)                  Erlang Module Definition                  wxGrid(3)
2
3
4

NAME

6       wxGrid - Functions for wxGrid class
7

DESCRIPTION

9       wxGrid and its related classes are used for displaying and editing tab‐
10       ular data. They provide a rich set of features  for  display,  editing,
11       and  interacting  with  a  variety of data sources. For simple applica‐
12       tions, and to help you get started, wxGrid is the only class  you  need
13       to  refer  to  directly.  It will set up default instances of the other
14       classes and manage them for you. For more complex applications you  can
15       derive  your  own classes for custom grid views, grid data tables, cell
16       editors and renderers. The overview_grid has  examples  of  simple  and
17       more  complex applications, explains the relationship between the vari‐
18       ous grid classes and has a summary of the keyboard shortcuts and  mouse
19       functions provided by wxGrid.
20
21       A  wxGridTableBase  (not implemented in wx) class holds the actual data
22       to be displayed by a wxGrid class. One or more wxGrid classes  may  act
23       as  a  view  for one table class. The default table class is called wx‐
24       GridStringTable (not implemented in wx) and holds an array of  strings.
25       An instance of such a class is created by createGrid/4.
26
27       wxGridCellRenderer is the abstract base class for rendering contents in
28       a cell. The following renderers are predefined:
29
30       The look of a cell can be further defined using wxGridCellAttr. An  ob‐
31       ject  of  this  type may be returned by wxGridTableBase::GetAttr() (not
32       implemented in wx).
33
34       wxGridCellEditor is the abstract base class for editing the value of  a
35       cell. The following editors are predefined:
36
37       Please  see  wxGridEvent,  wxGridSizeEvent (not implemented in wx), wx‐
38       GridRangeSelectEvent (not implemented in wx), and wxGridEditorCreatedE‐
39       vent  (not  implemented in wx) for the documentation of all event types
40       you can use with wxGrid.
41
42       See: Overview grid, wxGridUpdateLocker (not implemented in wx)
43
44       This class is derived (and can use  functions)  from:  wxScrolledWindow
45       wxPanel wxWindow wxEvtHandler
46
47       wxWidgets docs: wxGrid
48

DATA TYPES

50       wxGrid() = wx:wx_object()
51

EXPORTS

53       new() -> wxGrid()
54
55              Default constructor.
56
57              You  must call Create() (not implemented in wx) to really create
58              the grid window and also call createGrid/4  or  SetTable()  (not
59              implemented  in  wx) or AssignTable() (not implemented in wx) to
60              initialize its contents.
61
62       new(Parent, Id) -> wxGrid()
63
64              Types:
65
66                 Parent = wxWindow:wxWindow()
67                 Id = integer()
68
69       new(Parent, Id, Options :: [Option]) -> wxGrid()
70
71              Types:
72
73                 Parent = wxWindow:wxWindow()
74                 Id = integer()
75                 Option =
76                     {pos, {X :: integer(), Y :: integer()}} |
77                     {size, {W :: integer(), H :: integer()}} |
78                     {style, integer()}
79
80              Constructor creating the grid window.
81
82              You must call either createGrid/4 or SetTable() (not implemented
83              in  wx)  or  AssignTable() (not implemented in wx) to initialize
84              the grid contents before using it.
85
86       destroy(This :: wxGrid()) -> ok
87
88              Destructor.
89
90              This will also destroy the  associated  grid  table  unless  you
91              passed  a  table  object to the grid and specified that the grid
92              should not take ownership of the table (see SetTable() (not  im‐
93              plemented in wx)).
94
95       appendCols(This) -> boolean()
96
97              Types:
98
99                 This = wxGrid()
100
101       appendCols(This, Options :: [Option]) -> boolean()
102
103              Types:
104
105                 This = wxGrid()
106                 Option = {numCols, integer()} | {updateLabels, boolean()}
107
108              Appends one or more new columns to the right of the grid.
109
110              The updateLabels argument is not used at present. If you are us‐
111              ing a derived grid table class you will  need  to  override  wx‐
112              GridTableBase::AppendCols() (not implemented in wx). See insert‐
113              Cols/2 for further information.
114
115              Return: true on success or false if appending columns failed.
116
117       appendRows(This) -> boolean()
118
119              Types:
120
121                 This = wxGrid()
122
123       appendRows(This, Options :: [Option]) -> boolean()
124
125              Types:
126
127                 This = wxGrid()
128                 Option = {numRows, integer()} | {updateLabels, boolean()}
129
130              Appends one or more new rows to the bottom of the grid.
131
132              The updateLabels argument is not used at present. If you are us‐
133              ing  a  derived  grid  table class you will need to override wx‐
134              GridTableBase::AppendRows() (not implemented  in  wx).  See  in‐
135              sertRows/2 for further information.
136
137              Return: true on success or false if appending rows failed.
138
139       autoSize(This) -> ok
140
141              Types:
142
143                 This = wxGrid()
144
145              Automatically  sets the height and width of all rows and columns
146              to fit their contents.
147
148       autoSizeColumn(This, Col) -> ok
149
150              Types:
151
152                 This = wxGrid()
153                 Col = integer()
154
155       autoSizeColumn(This, Col, Options :: [Option]) -> ok
156
157              Types:
158
159                 This = wxGrid()
160                 Col = integer()
161                 Option = {setAsMin, boolean()}
162
163              Automatically sizes the column to fit its contents.
164
165              If setAsMin is true the calculated width will also be set as the
166              minimal width for the column.
167
168       autoSizeColumns(This) -> ok
169
170              Types:
171
172                 This = wxGrid()
173
174       autoSizeColumns(This, Options :: [Option]) -> ok
175
176              Types:
177
178                 This = wxGrid()
179                 Option = {setAsMin, boolean()}
180
181              Automatically sizes all columns to fit their contents.
182
183              If  setAsMin  is  true the calculated widths will also be set as
184              the minimal widths for the columns.
185
186       autoSizeRow(This, Row) -> ok
187
188              Types:
189
190                 This = wxGrid()
191                 Row = integer()
192
193       autoSizeRow(This, Row, Options :: [Option]) -> ok
194
195              Types:
196
197                 This = wxGrid()
198                 Row = integer()
199                 Option = {setAsMin, boolean()}
200
201              Automatically sizes the row to fit its contents.
202
203              If setAsMin is true the calculated height will also  be  set  as
204              the minimal height for the row.
205
206       autoSizeRows(This) -> ok
207
208              Types:
209
210                 This = wxGrid()
211
212       autoSizeRows(This, Options :: [Option]) -> ok
213
214              Types:
215
216                 This = wxGrid()
217                 Option = {setAsMin, boolean()}
218
219              Automatically sizes all rows to fit their contents.
220
221              If  setAsMin  is true the calculated heights will also be set as
222              the minimal heights for the rows.
223
224       beginBatch(This) -> ok
225
226              Types:
227
228                 This = wxGrid()
229
230              Increments the grid's batch count.
231
232              When the count is greater than zero repainting of  the  grid  is
233              suppressed.  Each  call to BeginBatch must be matched by a later
234              call to endBatch/1. Code that does a lot  of  grid  modification
235              can  be  enclosed  between  beginBatch/1 and endBatch/1 calls to
236              avoid screen flicker. The final endBatch/1 call will  cause  the
237              grid to be repainted.
238
239              Notice  that  you should use wxGridUpdateLocker (not implemented
240              in wx) which ensures that there is always a matching  endBatch/1
241              call  for  this beginBatch/1 if possible instead of calling this
242              method directly.
243
244       blockToDeviceRect(This, TopLeft, BottomRight) ->
245                            {X :: integer(),
246                             Y :: integer(),
247                             W :: integer(),
248                             H :: integer()}
249
250              Types:
251
252                 This = wxGrid()
253                 TopLeft = BottomRight = {R :: integer(), C :: integer()}
254
255              Convert grid cell coordinates to grid window pixel coordinates.
256
257              This function returns the rectangle that encloses the  block  of
258              cells  limited  by topLeft and bottomRight cell in device coords
259              and clipped to the client size of the grid window.
260
261              Since: 3.1.3 Parameter gridWindow has been added.
262
263              See: cellToRect/3
264
265       canDragCell(This) -> boolean()
266
267              Types:
268
269                 This = wxGrid()
270
271              Return true if the dragging of cells is enabled or false  other‐
272              wise.
273
274       canDragColMove(This) -> boolean()
275
276              Types:
277
278                 This = wxGrid()
279
280              Returns true if columns can be moved by dragging with the mouse.
281
282              Columns can be moved by dragging on their labels.
283
284       canDragGridRowEdges(This) -> boolean()
285
286              Types:
287
288                 This = wxGrid()
289
290              Return  true  if row edges inside the grid can be dragged to re‐
291              size the rows.
292
293              See: canDragGridSize/1, canDragRowSize/2
294
295              Since: 3.1.4
296
297       canDragColSize(This, Col) -> boolean()
298
299              Types:
300
301                 This = wxGrid()
302                 Col = integer()
303
304              Returns true if the given column can be resized by dragging with
305              the mouse.
306
307              This function returns true if resizing the columns interactively
308              is globally enabled, i.e. if  disableDragColSize/1  hadn't  been
309              called,  and  if this column wasn't explicitly marked as non-re‐
310              sizable with DisableColResize() (not implemented in wx).
311
312       canDragRowSize(This, Row) -> boolean()
313
314              Types:
315
316                 This = wxGrid()
317                 Row = integer()
318
319              Returns true if the given row can be resized  by  dragging  with
320              the mouse.
321
322              This is the same as canDragColSize/2 but for rows.
323
324       canDragGridSize(This) -> boolean()
325
326              Types:
327
328                 This = wxGrid()
329
330              Return  true  if  the  dragging of grid lines to resize rows and
331              columns is enabled or false otherwise.
332
333       canEnableCellControl(This) -> boolean()
334
335              Types:
336
337                 This = wxGrid()
338
339              Returns true if the in-place edit control for the  current  grid
340              cell can be used and false otherwise.
341
342              This function always returns false for the read-only cells.
343
344       cellToRect(This, Coords) ->
345                     {X :: integer(),
346                      Y :: integer(),
347                      W :: integer(),
348                      H :: integer()}
349
350              Types:
351
352                 This = wxGrid()
353                 Coords = {R :: integer(), C :: integer()}
354
355              Return  the  rectangle corresponding to the grid cell's size and
356              position in logical coordinates.
357
358              See: blockToDeviceRect/3
359
360       cellToRect(This, Row, Col) ->
361                     {X :: integer(),
362                      Y :: integer(),
363                      W :: integer(),
364                      H :: integer()}
365
366              Types:
367
368                 This = wxGrid()
369                 Row = Col = integer()
370
371              Return the rectangle corresponding to the grid cell's  size  and
372              position in logical coordinates.
373
374              See: blockToDeviceRect/3
375
376       clearGrid(This) -> ok
377
378              Types:
379
380                 This = wxGrid()
381
382              Clears  all  data  in the underlying grid table and repaints the
383              grid.
384
385              The table is not deleted by this function. If you  are  using  a
386              derived  table  class  then  you  need  to override wxGridTable‐
387              Base::Clear() (not implemented in wx) for this function to  have
388              any effect.
389
390       clearSelection(This) -> ok
391
392              Types:
393
394                 This = wxGrid()
395
396              Deselects all cells that are currently selected.
397
398       createGrid(This, NumRows, NumCols) -> boolean()
399
400              Types:
401
402                 This = wxGrid()
403                 NumRows = NumCols = integer()
404
405       createGrid(This, NumRows, NumCols, Options :: [Option]) ->
406                     boolean()
407
408              Types:
409
410                 This = wxGrid()
411                 NumRows = NumCols = integer()
412                 Option = {selmode, wx:wx_enum()}
413
414              Creates  a  grid  with  the specified initial number of rows and
415              columns.
416
417              Call this directly after the grid constructor. When you use this
418              function  wxGrid will create and manage a simple table of string
419              values for you. All of the grid data will be stored in memory.
420
421              For applications with more complex data types or  relationships,
422              or  for dealing with very large datasets, you should derive your
423              own grid table class and pass a table object to  the  grid  with
424              SetTable()  (not implemented in wx) or AssignTable() (not imple‐
425              mented in wx).
426
427       deleteCols(This) -> boolean()
428
429              Types:
430
431                 This = wxGrid()
432
433       deleteCols(This, Options :: [Option]) -> boolean()
434
435              Types:
436
437                 This = wxGrid()
438                 Option =
439                     {pos, integer()} |
440                     {numCols, integer()} |
441                     {updateLabels, boolean()}
442
443              Deletes one or more columns from a grid starting at  the  speci‐
444              fied position.
445
446              The updateLabels argument is not used at present. If you are us‐
447              ing a derived grid table class you will  need  to  override  wx‐
448              GridTableBase::DeleteCols() (not implemented in wx). See insert‐
449              Cols/2 for further information.
450
451              Return: true on success or false if deleting columns failed.
452
453       deleteRows(This) -> boolean()
454
455              Types:
456
457                 This = wxGrid()
458
459       deleteRows(This, Options :: [Option]) -> boolean()
460
461              Types:
462
463                 This = wxGrid()
464                 Option =
465                     {pos, integer()} |
466                     {numRows, integer()} |
467                     {updateLabels, boolean()}
468
469              Deletes one or more rows from a grid starting at  the  specified
470              position.
471
472              The updateLabels argument is not used at present. If you are us‐
473              ing a derived grid table class you will  need  to  override  wx‐
474              GridTableBase::DeleteRows()  (not  implemented  in  wx). See in‐
475              sertRows/2 for further information.
476
477              Return: true on success or false if deleting rows failed.
478
479       disableCellEditControl(This) -> ok
480
481              Types:
482
483                 This = wxGrid()
484
485              Disables in-place editing of grid cells.
486
487              Equivalent to calling EnableCellEditControl(false).
488
489       disableDragColSize(This) -> ok
490
491              Types:
492
493                 This = wxGrid()
494
495              Disables column sizing by dragging with the mouse.
496
497              Equivalent to passing false to enableDragColSize/2.
498
499       disableDragGridSize(This) -> ok
500
501              Types:
502
503                 This = wxGrid()
504
505              Disable mouse dragging of grid lines to resize rows and columns.
506
507              Equivalent to passing false to enableDragGridSize/2
508
509       disableDragRowSize(This) -> ok
510
511              Types:
512
513                 This = wxGrid()
514
515              Disables row sizing by dragging with the mouse.
516
517              Equivalent to passing false to enableDragRowSize/2.
518
519       enableCellEditControl(This) -> ok
520
521              Types:
522
523                 This = wxGrid()
524
525       enableCellEditControl(This, Options :: [Option]) -> ok
526
527              Types:
528
529                 This = wxGrid()
530                 Option = {enable, boolean()}
531
532              Enables or disables in-place editing of grid cell data.
533
534              Enabling in-place editing generates wxEVT_GRID_EDITOR_SHOWN and,
535              if it isn't vetoed by the application, shows the in-place editor
536              which allows the user to change the cell value.
537
538              Disabling in-place editing does nothing if the  in-place  editor
539              isn't  currently  shown,  otherwise the wxEVT_GRID_EDITOR_HIDDEN
540              event is generated but, unlike the "shown" event,  it  can't  be
541              vetoed and the in-place editor is dismissed unconditionally.
542
543              Note  that  it  is an error to call this function if the current
544              cell is read-only, use canEnableCellControl/1 to check for  this
545              precondition.
546
547       enableDragColSize(This) -> ok
548
549              Types:
550
551                 This = wxGrid()
552
553       enableDragColSize(This, Options :: [Option]) -> ok
554
555              Types:
556
557                 This = wxGrid()
558                 Option = {enable, boolean()}
559
560              Enables or disables column sizing by dragging with the mouse.
561
562              See: DisableColResize() (not implemented in wx)
563
564       enableDragGridSize(This) -> ok
565
566              Types:
567
568                 This = wxGrid()
569
570       enableDragGridSize(This, Options :: [Option]) -> ok
571
572              Types:
573
574                 This = wxGrid()
575                 Option = {enable, boolean()}
576
577              Enables  or  disables  row and column resizing by dragging grid‐
578              lines with the mouse.
579
580       enableDragRowSize(This) -> ok
581
582              Types:
583
584                 This = wxGrid()
585
586       enableDragRowSize(This, Options :: [Option]) -> ok
587
588              Types:
589
590                 This = wxGrid()
591                 Option = {enable, boolean()}
592
593              Enables or disables row sizing by dragging with the mouse.
594
595              See: DisableRowResize() (not implemented in wx)
596
597       enableEditing(This, Edit) -> ok
598
599              Types:
600
601                 This = wxGrid()
602                 Edit = boolean()
603
604              Makes the grid globally editable or read-only.
605
606              If the edit argument is false this function sets the whole  grid
607              as read-only. If the argument is true the grid is set to the de‐
608              fault state where cells may be editable. In  the  default  state
609              you  can  set single grid cells and whole rows and columns to be
610              editable or read-only via wxGridCellAttr:setReadOnly/2. For sin‐
611              gle cells you can also use the shortcut function setReadOnly/4.
612
613              For  more information about controlling grid cell attributes see
614              the wxGridCellAttr class and the overview_grid.
615
616       enableGridLines(This) -> ok
617
618              Types:
619
620                 This = wxGrid()
621
622       enableGridLines(This, Options :: [Option]) -> ok
623
624              Types:
625
626                 This = wxGrid()
627                 Option = {enable, boolean()}
628
629              Turns the drawing of grid lines on or off.
630
631       endBatch(This) -> ok
632
633              Types:
634
635                 This = wxGrid()
636
637              Decrements the grid's batch count.
638
639              When the count is greater than zero repainting of  the  grid  is
640              suppressed.  Each  previous call to beginBatch/1 must be matched
641              by a later call to endBatch/1. Code that does a lot of grid mod‐
642              ification  can  be  enclosed between beginBatch/1 and endBatch/1
643              calls to avoid screen flicker. The final endBatch/1  will  cause
644              the grid to be repainted.
645
646              See: wxGridUpdateLocker (not implemented in wx)
647
648       fit(This) -> ok
649
650              Types:
651
652                 This = wxGrid()
653
654              Overridden wxWindow method.
655
656       forceRefresh(This) -> ok
657
658              Types:
659
660                 This = wxGrid()
661
662              Causes immediate repainting of the grid.
663
664              Use this instead of the usual wxWindow:refresh/2.
665
666       getBatchCount(This) -> integer()
667
668              Types:
669
670                 This = wxGrid()
671
672              Returns  the  number  of times that beginBatch/1 has been called
673              without (yet) matching calls to endBatch/1.
674
675              While the grid's batch count is greater than  zero  the  display
676              will not be updated.
677
678       getCellAlignment(This, Row, Col) ->
679                           {Horiz :: integer(), Vert :: integer()}
680
681              Types:
682
683                 This = wxGrid()
684                 Row = Col = integer()
685
686              Sets the arguments to the horizontal and vertical text alignment
687              values for the grid cell at the specified location.
688
689              Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE
690              or wxALIGN_RIGHT.
691
692              Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or
693              wxALIGN_BOTTOM.
694
695       getCellBackgroundColour(This, Row, Col) -> wx:wx_colour4()
696
697              Types:
698
699                 This = wxGrid()
700                 Row = Col = integer()
701
702              Returns the background colour of the cell at the specified loca‐
703              tion.
704
705       getCellEditor(This, Row, Col) ->
706                        wxGridCellEditor:wxGridCellEditor()
707
708              Types:
709
710                 This = wxGrid()
711                 Row = Col = integer()
712
713              Returns  a  pointer  to the editor for the cell at the specified
714              location.
715
716              See wxGridCellEditor and the overview_grid for more  information
717              about cell editors and renderers.
718
719              The caller must call DecRef() on the returned pointer.
720
721       getCellFont(This, Row, Col) -> wxFont:wxFont()
722
723              Types:
724
725                 This = wxGrid()
726                 Row = Col = integer()
727
728              Returns  the font for text in the grid cell at the specified lo‐
729              cation.
730
731       getCellRenderer(This, Row, Col) ->
732                          wxGridCellRenderer:wxGridCellRenderer()
733
734              Types:
735
736                 This = wxGrid()
737                 Row = Col = integer()
738
739              Returns a pointer to the renderer for the grid cell at the spec‐
740              ified location.
741
742              See  wxGridCellRenderer  and the overview_grid for more informa‐
743              tion about cell editors and renderers.
744
745              The caller must call DecRef() on the returned pointer.
746
747       getCellTextColour(This, Row, Col) -> wx:wx_colour4()
748
749              Types:
750
751                 This = wxGrid()
752                 Row = Col = integer()
753
754              Returns the text colour for the grid cell at the specified loca‐
755              tion.
756
757       getCellValue(This, Coords) -> unicode:charlist()
758
759              Types:
760
761                 This = wxGrid()
762                 Coords = {R :: integer(), C :: integer()}
763
764              Returns  the string contained in the cell at the specified loca‐
765              tion.
766
767              For simple applications where a grid object automatically uses a
768              default  grid  table  of string values you use this function to‐
769              gether with setCellValue/4 to access cell values. For more  com‐
770              plex  applications  where  you  have derived your own grid table
771              class that contains various data types (e.g. numeric, boolean or
772              user-defined  custom  types) then you only use this function for
773              those cells that contain string values.
774
775              See wxGridTableBase::CanGetValueAs() (not implemented in wx) and
776              the overview_grid for more information.
777
778       getCellValue(This, Row, Col) -> unicode:charlist()
779
780              Types:
781
782                 This = wxGrid()
783                 Row = Col = integer()
784
785              Returns  the string contained in the cell at the specified loca‐
786              tion.
787
788              For simple applications where a grid object automatically uses a
789              default  grid  table  of string values you use this function to‐
790              gether with setCellValue/4 to access cell values. For more  com‐
791              plex  applications  where  you  have derived your own grid table
792              class that contains various data types (e.g. numeric, boolean or
793              user-defined  custom  types) then you only use this function for
794              those cells that contain string values.
795
796              See wxGridTableBase::CanGetValueAs() (not implemented in wx) and
797              the overview_grid for more information.
798
799       getColLabelAlignment(This) ->
800                               {Horiz :: integer(), Vert :: integer()}
801
802              Types:
803
804                 This = wxGrid()
805
806              Sets the arguments to the current column label alignment values.
807
808              Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE
809              or wxALIGN_RIGHT.
810
811              Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or
812              wxALIGN_BOTTOM.
813
814       getColLabelSize(This) -> integer()
815
816              Types:
817
818                 This = wxGrid()
819
820              Returns the current height of the column labels.
821
822       getColLabelValue(This, Col) -> unicode:charlist()
823
824              Types:
825
826                 This = wxGrid()
827                 Col = integer()
828
829              Returns the specified column label.
830
831              The  default grid table class provides column labels of the form
832              A,B...Z,AA,AB...ZZ,AAA... If you are using a custom  grid  table
833              you can override wxGridTableBase::GetColLabelValue() (not imple‐
834              mented in wx) to provide your own labels.
835
836       getColMinimalAcceptableWidth(This) -> integer()
837
838              Types:
839
840                 This = wxGrid()
841
842              Returns the minimal width to which a column may be resized.
843
844              Use setColMinimalAcceptableWidth/2 to change this value globally
845              or setColMinimalWidth/3 to do it for individual columns.
846
847              See: getRowMinimalAcceptableHeight/1
848
849       getDefaultCellAlignment(This) ->
850                                  {Horiz :: integer(), Vert :: integer()}
851
852              Types:
853
854                 This = wxGrid()
855
856              Returns the default cell alignment.
857
858              Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE
859              or wxALIGN_RIGHT.
860
861              Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or
862              wxALIGN_BOTTOM.
863
864              See: setDefaultCellAlignment/3
865
866       getDefaultCellBackgroundColour(This) -> wx:wx_colour4()
867
868              Types:
869
870                 This = wxGrid()
871
872              Returns the current default background colour for grid cells.
873
874       getDefaultCellFont(This) -> wxFont:wxFont()
875
876              Types:
877
878                 This = wxGrid()
879
880              Returns the current default font for grid cell text.
881
882       getDefaultCellTextColour(This) -> wx:wx_colour4()
883
884              Types:
885
886                 This = wxGrid()
887
888              Returns the current default colour for grid cell text.
889
890       getDefaultColLabelSize(This) -> integer()
891
892              Types:
893
894                 This = wxGrid()
895
896              Returns the default height for column labels.
897
898       getDefaultColSize(This) -> integer()
899
900              Types:
901
902                 This = wxGrid()
903
904              Returns the current default width for grid columns.
905
906       getDefaultEditor(This) -> wxGridCellEditor:wxGridCellEditor()
907
908              Types:
909
910                 This = wxGrid()
911
912              Returns a pointer to the current default grid cell editor.
913
914              See  wxGridCellEditor and the overview_grid for more information
915              about cell editors and renderers.
916
917       getDefaultEditorForCell(This, C) ->
918                                  wxGridCellEditor:wxGridCellEditor()
919
920              Types:
921
922                 This = wxGrid()
923                 C = {R :: integer(), C :: integer()}
924
925              Returns the default editor for the specified cell.
926
927              The base class version returns the editor  appropriate  for  the
928              current  cell  type but this method may be overridden in the de‐
929              rived classes to use custom editors for some cells by default.
930
931              Notice that the same may be achieved in a usually simpler way by
932              associating a custom editor with the given cell or cells.
933
934              The caller must call DecRef() on the returned pointer.
935
936       getDefaultEditorForCell(This, Row, Col) ->
937                                  wxGridCellEditor:wxGridCellEditor()
938
939              Types:
940
941                 This = wxGrid()
942                 Row = Col = integer()
943
944              Returns the default editor for the specified cell.
945
946              The  base  class  version returns the editor appropriate for the
947              current cell type but this method may be overridden in  the  de‐
948              rived classes to use custom editors for some cells by default.
949
950              Notice that the same may be achieved in a usually simpler way by
951              associating a custom editor with the given cell or cells.
952
953              The caller must call DecRef() on the returned pointer.
954
955       getDefaultEditorForType(This, TypeName) ->
956                                  wxGridCellEditor:wxGridCellEditor()
957
958              Types:
959
960                 This = wxGrid()
961                 TypeName = unicode:chardata()
962
963              Returns the default editor for the cells  containing  values  of
964              the given type.
965
966              The  base  class version returns the editor which was associated
967              with the specified typeName when  it  was  registered  register‐
968              DataType/4  but  this function may be overridden to return some‐
969              thing different. This allows overriding an editor used  for  one
970              of the standard types.
971
972              The caller must call DecRef() on the returned pointer.
973
974       getDefaultRenderer(This) ->
975                             wxGridCellRenderer:wxGridCellRenderer()
976
977              Types:
978
979                 This = wxGrid()
980
981              Returns a pointer to the current default grid cell renderer.
982
983              See  wxGridCellRenderer  and the overview_grid for more informa‐
984              tion about cell editors and renderers.
985
986              The caller must call DecRef() on the returned pointer.
987
988       getDefaultRendererForCell(This, Row, Col) ->
989                                    wxGridCellRenderer:wxGridCellRenderer()
990
991              Types:
992
993                 This = wxGrid()
994                 Row = Col = integer()
995
996              Returns the default renderer for the given cell.
997
998              The base class version returns the renderer appropriate for  the
999              current  cell  type but this method may be overridden in the de‐
1000              rived classes to use custom renderers for some cells by default.
1001
1002              The caller must call DecRef() on the returned pointer.
1003
1004       getDefaultRendererForType(This, TypeName) ->
1005                                    wxGridCellRenderer:wxGridCellRenderer()
1006
1007              Types:
1008
1009                 This = wxGrid()
1010                 TypeName = unicode:chardata()
1011
1012              Returns the default renderer for the cell containing  values  of
1013              the given type.
1014
1015              See: getDefaultEditorForType/2
1016
1017       getDefaultRowLabelSize(This) -> integer()
1018
1019              Types:
1020
1021                 This = wxGrid()
1022
1023              Returns the default width for the row labels.
1024
1025       getDefaultRowSize(This) -> integer()
1026
1027              Types:
1028
1029                 This = wxGrid()
1030
1031              Returns the current default height for grid rows.
1032
1033       getGridCursorCol(This) -> integer()
1034
1035              Types:
1036
1037                 This = wxGrid()
1038
1039              Returns the current grid cell column position.
1040
1041              See: GetGridCursorCoords() (not implemented in wx)
1042
1043       getGridCursorRow(This) -> integer()
1044
1045              Types:
1046
1047                 This = wxGrid()
1048
1049              Returns the current grid cell row position.
1050
1051              See: GetGridCursorCoords() (not implemented in wx)
1052
1053       getGridLineColour(This) -> wx:wx_colour4()
1054
1055              Types:
1056
1057                 This = wxGrid()
1058
1059              Returns the colour used for grid lines.
1060
1061              See: GetDefaultGridLinePen() (not implemented in wx)
1062
1063       gridLinesEnabled(This) -> boolean()
1064
1065              Types:
1066
1067                 This = wxGrid()
1068
1069              Returns true if drawing of grid lines is turned on, false other‐
1070              wise.
1071
1072       getLabelBackgroundColour(This) -> wx:wx_colour4()
1073
1074              Types:
1075
1076                 This = wxGrid()
1077
1078              Returns the colour used for the background of row and column la‐
1079              bels.
1080
1081       getLabelFont(This) -> wxFont:wxFont()
1082
1083              Types:
1084
1085                 This = wxGrid()
1086
1087              Returns the font used for row and column labels.
1088
1089       getLabelTextColour(This) -> wx:wx_colour4()
1090
1091              Types:
1092
1093                 This = wxGrid()
1094
1095              Returns the colour used for row and column label text.
1096
1097       getNumberCols(This) -> integer()
1098
1099              Types:
1100
1101                 This = wxGrid()
1102
1103              Returns the total number of grid columns.
1104
1105              This is the same as the number of columns in the underlying grid
1106              table.
1107
1108       getNumberRows(This) -> integer()
1109
1110              Types:
1111
1112                 This = wxGrid()
1113
1114              Returns the total number of grid rows.
1115
1116              This is the same as the number of rows in  the  underlying  grid
1117              table.
1118
1119       getOrCreateCellAttr(This, Row, Col) ->
1120                              wxGridCellAttr:wxGridCellAttr()
1121
1122              Types:
1123
1124                 This = wxGrid()
1125                 Row = Col = integer()
1126
1127              Returns  the attribute for the given cell creating one if neces‐
1128              sary.
1129
1130              If the cell already has an attribute, it is returned.  Otherwise
1131              a  new  attribute  is  created, associated with the cell and re‐
1132              turned. In any case the caller must call  DecRef()  on  the  re‐
1133              turned pointer.
1134
1135              Prefer  to  use GetOrCreateCellAttrPtr() (not implemented in wx)
1136              to avoid the need to call DecRef() on the returned pointer.
1137
1138              This function may only be called if CanHaveAttributes() (not im‐
1139              plemented in wx) returns true.
1140
1141       getRowMinimalAcceptableHeight(This) -> integer()
1142
1143              Types:
1144
1145                 This = wxGrid()
1146
1147              Returns the minimal size to which rows can be resized.
1148
1149              Use  setRowMinimalAcceptableHeight/2  to change this value glob‐
1150              ally or setRowMinimalHeight/3 to do it for individual cells.
1151
1152              See: getColMinimalAcceptableWidth/1
1153
1154       getRowLabelAlignment(This) ->
1155                               {Horiz :: integer(), Vert :: integer()}
1156
1157              Types:
1158
1159                 This = wxGrid()
1160
1161              Returns the alignment used for row labels.
1162
1163              Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE
1164              or wxALIGN_RIGHT.
1165
1166              Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or
1167              wxALIGN_BOTTOM.
1168
1169       getRowLabelSize(This) -> integer()
1170
1171              Types:
1172
1173                 This = wxGrid()
1174
1175              Returns the current width of the row labels.
1176
1177       getRowLabelValue(This, Row) -> unicode:charlist()
1178
1179              Types:
1180
1181                 This = wxGrid()
1182                 Row = integer()
1183
1184              Returns the specified row label.
1185
1186              The default grid table class provides numeric row labels. If you
1187              are  using  a  custom  grid  table you can override wxGridTable‐
1188              Base::GetRowLabelValue() (not implemented in wx) to provide your
1189              own labels.
1190
1191       getRowSize(This, Row) -> integer()
1192
1193              Types:
1194
1195                 This = wxGrid()
1196                 Row = integer()
1197
1198              Returns the height of the specified row.
1199
1200       getScrollLineX(This) -> integer()
1201
1202              Types:
1203
1204                 This = wxGrid()
1205
1206              Returns the number of pixels per horizontal scroll increment.
1207
1208              The default is 15.
1209
1210              See: getScrollLineY/1, setScrollLineX/2, setScrollLineY/2
1211
1212       getScrollLineY(This) -> integer()
1213
1214              Types:
1215
1216                 This = wxGrid()
1217
1218              Returns the number of pixels per vertical scroll increment.
1219
1220              The default is 15.
1221
1222              See: getScrollLineX/1, setScrollLineX/2, setScrollLineY/2
1223
1224       getSelectedCells(This) -> [{R :: integer(), C :: integer()}]
1225
1226              Types:
1227
1228                 This = wxGrid()
1229
1230              Returns an array of individually selected cells.
1231
1232              Notice  that  this array does not contain all the selected cells
1233              in general as it doesn't include the cells selected as  part  of
1234              column, row or block selection. You must use this method, getSe‐
1235              lectedCols/1, getSelectedRows/1  and  getSelectionBlockTopLeft/1
1236              and  getSelectionBlockBottomRight/1 methods to obtain the entire
1237              selection in general.
1238
1239              Please notice this behaviour is by design and is needed in order
1240              to support grids of arbitrary size (when an entire column is se‐
1241              lected in a grid with a million of columns,  we  don't  want  to
1242              create  an array with a million of entries in this function, in‐
1243              stead it returns an empty array and getSelectedCols/1 returns an
1244              array containing one element).
1245
1246              The  function  can  be  slow for the big grids, use GetSelected‐
1247              Blocks() (not implemented in wx) in the new code.
1248
1249       getSelectedCols(This) -> [integer()]
1250
1251              Types:
1252
1253                 This = wxGrid()
1254
1255              Returns an array of selected columns.
1256
1257              Please notice that this method alone is not sufficient  to  find
1258              all  the  selected columns as it contains only the columns which
1259              were individually selected but not those being part of the block
1260              selection  or being selected in virtue of all of their cells be‐
1261              ing selected individually,  please  see  getSelectedCells/1  for
1262              more details.
1263
1264              The  function  can  be  slow for the big grids, use GetSelected‐
1265              Blocks() (not implemented in wx) in the new code.
1266
1267       getSelectedRows(This) -> [integer()]
1268
1269              Types:
1270
1271                 This = wxGrid()
1272
1273              Returns an array of selected rows.
1274
1275              Please notice that this method alone is not sufficient  to  find
1276              all  the  selected  rows as it contains only the rows which were
1277              individually selected but not those being part of the block  se‐
1278              lection  or being selected in virtue of all of their cells being
1279              selected individually, please see  getSelectedCells/1  for  more
1280              details.
1281
1282              The  function  can  be  slow for the big grids, use GetSelected‐
1283              Blocks() (not implemented in wx) in the new code.
1284
1285       getSelectionBackground(This) -> wx:wx_colour4()
1286
1287              Types:
1288
1289                 This = wxGrid()
1290
1291              Returns the colour used for drawing the selection background.
1292
1293       getSelectionBlockTopLeft(This) ->
1294                                   [{R :: integer(), C :: integer()}]
1295
1296              Types:
1297
1298                 This = wxGrid()
1299
1300              Returns an array of the top left corners of blocks  of  selected
1301              cells.
1302
1303              Please see getSelectedCells/1 for more information about the se‐
1304              lection representation in wxGrid.
1305
1306              The function can be slow for the  big  grids,  use  GetSelected‐
1307              Blocks() (not implemented in wx) in the new code.
1308
1309              See: getSelectionBlockBottomRight/1
1310
1311       getSelectionBlockBottomRight(This) ->
1312                                       [{R :: integer(), C :: integer()}]
1313
1314              Types:
1315
1316                 This = wxGrid()
1317
1318              Returns  an  array  of the bottom right corners of blocks of se‐
1319              lected cells.
1320
1321              Please see getSelectedCells/1 for more information about the se‐
1322              lection representation in wxGrid.
1323
1324              The  function  can  be  slow for the big grids, use GetSelected‐
1325              Blocks() (not implemented in wx) in the new code.
1326
1327              See: getSelectionBlockTopLeft/1
1328
1329       getSelectionForeground(This) -> wx:wx_colour4()
1330
1331              Types:
1332
1333                 This = wxGrid()
1334
1335              Returns the colour used for drawing the selection foreground.
1336
1337       getGridWindow(This) -> wxWindow:wxWindow()
1338
1339              Types:
1340
1341                 This = wxGrid()
1342
1343              Return the main grid window containing the grid cells.
1344
1345              This window is always shown.
1346
1347       getGridRowLabelWindow(This) -> wxWindow:wxWindow()
1348
1349              Types:
1350
1351                 This = wxGrid()
1352
1353              Return the row labels window.
1354
1355              This window is not shown if the row  labels  were  hidden  using
1356              HideRowLabels() (not implemented in wx).
1357
1358       getGridColLabelWindow(This) -> wxWindow:wxWindow()
1359
1360              Types:
1361
1362                 This = wxGrid()
1363
1364              Return the column labels window.
1365
1366              This window is not shown if the columns labels were hidden using
1367              HideColLabels() (not implemented in wx).
1368
1369              Depending on whether UseNativeColHeader()  (not  implemented  in
1370              wx) was called or not this can be either a wxHeaderCtrl (not im‐
1371              plemented in wx) or a plain wxWindow. This  function  returns  a
1372              valid  window  pointer in either case but in the former case you
1373              can also use GetGridColHeader() (not implemented in wx)  to  ac‐
1374              cess it if you need wxHeaderCtrl-specific functionality.
1375
1376       getGridCornerLabelWindow(This) -> wxWindow:wxWindow()
1377
1378              Types:
1379
1380                 This = wxGrid()
1381
1382              Return the window in the top left grid corner.
1383
1384              This  window  is  shown  only of both columns and row labels are
1385              shown and normally doesn't contain anything. Clicking on  it  is
1386              handled  by  wxGrid however and can be used to select the entire
1387              grid.
1388
1389       hideCellEditControl(This) -> ok
1390
1391              Types:
1392
1393                 This = wxGrid()
1394
1395              Hides the in-place cell edit control.
1396
1397       insertCols(This) -> boolean()
1398
1399              Types:
1400
1401                 This = wxGrid()
1402
1403       insertCols(This, Options :: [Option]) -> boolean()
1404
1405              Types:
1406
1407                 This = wxGrid()
1408                 Option =
1409                     {pos, integer()} |
1410                     {numCols, integer()} |
1411                     {updateLabels, boolean()}
1412
1413              Inserts one or more new columns into a grid with the  first  new
1414              column at the specified position.
1415
1416              Notice  that inserting the columns in the grid requires grid ta‐
1417              ble cooperation: when this method is called, grid object  begins
1418              by  requesting  the underlying grid table to insert new columns.
1419              If this is successful the table notifies the grid and  the  grid
1420              updates  the  display.  For  a  default grid (one where you have
1421              called createGrid/4) this process is automatic. If you are using
1422              a  custom grid table (specified with SetTable() (not implemented
1423              in wx) or AssignTable() (not implemented in wx)) then  you  must
1424              override  wxGridTableBase::InsertCols()  (not implemented in wx)
1425              in your derived table class.
1426
1427              Return: true if the columns were successfully inserted, false if
1428              an error occurred (most likely the table couldn't be updated).
1429
1430       insertRows(This) -> boolean()
1431
1432              Types:
1433
1434                 This = wxGrid()
1435
1436       insertRows(This, Options :: [Option]) -> boolean()
1437
1438              Types:
1439
1440                 This = wxGrid()
1441                 Option =
1442                     {pos, integer()} |
1443                     {numRows, integer()} |
1444                     {updateLabels, boolean()}
1445
1446              Inserts  one or more new rows into a grid with the first new row
1447              at the specified position.
1448
1449              Notice that  you  must  implement  wxGridTableBase::InsertRows()
1450              (not  implemented  in wx) if you use a grid with a custom table,
1451              please see insertCols/2 for more information.
1452
1453              Return: true if the rows were successfully inserted, false if an
1454              error occurred (most likely the table couldn't be updated).
1455
1456       isCellEditControlEnabled(This) -> boolean()
1457
1458              Types:
1459
1460                 This = wxGrid()
1461
1462              Returns true if the in-place edit control is currently enabled.
1463
1464       isCurrentCellReadOnly(This) -> boolean()
1465
1466              Types:
1467
1468                 This = wxGrid()
1469
1470              Returns true if the current cell is read-only.
1471
1472              See: setReadOnly/4, isReadOnly/3
1473
1474       isEditable(This) -> boolean()
1475
1476              Types:
1477
1478                 This = wxGrid()
1479
1480              Returns  false  if  the  whole grid has been set as read-only or
1481              true otherwise.
1482
1483              See enableEditing/2 for more information about  controlling  the
1484              editing status of grid cells.
1485
1486       isInSelection(This, Coords) -> boolean()
1487
1488              Types:
1489
1490                 This = wxGrid()
1491                 Coords = {R :: integer(), C :: integer()}
1492
1493              Returns true if the given cell is selected.
1494
1495       isInSelection(This, Row, Col) -> boolean()
1496
1497              Types:
1498
1499                 This = wxGrid()
1500                 Row = Col = integer()
1501
1502              Returns true if the given cell is selected.
1503
1504       isReadOnly(This, Row, Col) -> boolean()
1505
1506              Types:
1507
1508                 This = wxGrid()
1509                 Row = Col = integer()
1510
1511              Returns  true  if  the  cell  at the specified location can't be
1512              edited.
1513
1514              See: setReadOnly/4, isCurrentCellReadOnly/1
1515
1516       isSelection(This) -> boolean()
1517
1518              Types:
1519
1520                 This = wxGrid()
1521
1522              Returns true if there are currently any  selected  cells,  rows,
1523              columns or blocks.
1524
1525       isVisible(This, Coords) -> boolean()
1526
1527              Types:
1528
1529                 This = wxGrid()
1530                 Coords = {R :: integer(), C :: integer()}
1531
1532       isVisible(This, Row, Col) -> boolean()
1533
1534       isVisible(This, Coords, Col :: [Option]) -> boolean()
1535
1536              Types:
1537
1538                 This = wxGrid()
1539                 Coords = {R :: integer(), C :: integer()}
1540                 Option = {wholeCellVisible, boolean()}
1541
1542              Returns  true if a cell is either entirely or at least partially
1543              visible in the grid window.
1544
1545              By default, the cell must be entirely visible for this  function
1546              to  return  true  but if wholeCellVisible is false, the function
1547              returns true even if the cell is only partially visible.
1548
1549       isVisible(This, Row, Col, Options :: [Option]) -> boolean()
1550
1551              Types:
1552
1553                 This = wxGrid()
1554                 Row = Col = integer()
1555                 Option = {wholeCellVisible, boolean()}
1556
1557              Returns true if a cell is either entirely or at least  partially
1558              visible in the grid window.
1559
1560              By  default, the cell must be entirely visible for this function
1561              to return true but if wholeCellVisible is  false,  the  function
1562              returns true even if the cell is only partially visible.
1563
1564       makeCellVisible(This, Coords) -> ok
1565
1566              Types:
1567
1568                 This = wxGrid()
1569                 Coords = {R :: integer(), C :: integer()}
1570
1571              Brings  the  specified cell into the visible grid cell area with
1572              minimal scrolling.
1573
1574              Does nothing if the cell is already visible.
1575
1576       makeCellVisible(This, Row, Col) -> ok
1577
1578              Types:
1579
1580                 This = wxGrid()
1581                 Row = Col = integer()
1582
1583              Brings the specified cell into the visible grid cell  area  with
1584              minimal scrolling.
1585
1586              Does nothing if the cell is already visible.
1587
1588       moveCursorDown(This, ExpandSelection) -> boolean()
1589
1590              Types:
1591
1592                 This = wxGrid()
1593                 ExpandSelection = boolean()
1594
1595              Moves the grid cursor down by one row.
1596
1597              If  a  block  of cells was previously selected it will expand if
1598              the argument is true or be cleared if the argument is false.
1599
1600       moveCursorLeft(This, ExpandSelection) -> boolean()
1601
1602              Types:
1603
1604                 This = wxGrid()
1605                 ExpandSelection = boolean()
1606
1607              Moves the grid cursor left by one column.
1608
1609              If a block of cells was previously selected it  will  expand  if
1610              the argument is true or be cleared if the argument is false.
1611
1612       moveCursorRight(This, ExpandSelection) -> boolean()
1613
1614              Types:
1615
1616                 This = wxGrid()
1617                 ExpandSelection = boolean()
1618
1619              Moves the grid cursor right by one column.
1620
1621              If  a  block  of cells was previously selected it will expand if
1622              the argument is true or be cleared if the argument is false.
1623
1624       moveCursorUp(This, ExpandSelection) -> boolean()
1625
1626              Types:
1627
1628                 This = wxGrid()
1629                 ExpandSelection = boolean()
1630
1631              Moves the grid cursor up by one row.
1632
1633              If a block of cells was previously selected it  will  expand  if
1634              the argument is true or be cleared if the argument is false.
1635
1636       moveCursorDownBlock(This, ExpandSelection) -> boolean()
1637
1638              Types:
1639
1640                 This = wxGrid()
1641                 ExpandSelection = boolean()
1642
1643              Moves  the  grid  cursor down in the current column such that it
1644              skips to the beginning or end of a block of non-empty cells.
1645
1646              If a block of cells was previously selected it  will  expand  if
1647              the argument is true or be cleared if the argument is false.
1648
1649       moveCursorLeftBlock(This, ExpandSelection) -> boolean()
1650
1651              Types:
1652
1653                 This = wxGrid()
1654                 ExpandSelection = boolean()
1655
1656              Moves the grid cursor left in the current row such that it skips
1657              to the beginning or end of a block of non-empty cells.
1658
1659              If a block of cells was previously selected it  will  expand  if
1660              the argument is true or be cleared if the argument is false.
1661
1662       moveCursorRightBlock(This, ExpandSelection) -> boolean()
1663
1664              Types:
1665
1666                 This = wxGrid()
1667                 ExpandSelection = boolean()
1668
1669              Moves  the  grid  cursor  right  in the current row such that it
1670              skips to the beginning or end of a block of non-empty cells.
1671
1672              If a block of cells was previously selected it  will  expand  if
1673              the argument is true or be cleared if the argument is false.
1674
1675       moveCursorUpBlock(This, ExpandSelection) -> boolean()
1676
1677              Types:
1678
1679                 This = wxGrid()
1680                 ExpandSelection = boolean()
1681
1682              Moves  the  grid  cursor  up  in the current column such that it
1683              skips to the beginning or end of a block of non-empty cells.
1684
1685              If a block of cells was previously selected it  will  expand  if
1686              the argument is true or be cleared if the argument is false.
1687
1688       movePageDown(This) -> boolean()
1689
1690              Types:
1691
1692                 This = wxGrid()
1693
1694              Moves  the  grid  cursor down by some number of rows so that the
1695              previous bottom visible row becomes the top visible row.
1696
1697       movePageUp(This) -> boolean()
1698
1699              Types:
1700
1701                 This = wxGrid()
1702
1703              Moves the grid cursor up by some number of rows so that the pre‐
1704              vious top visible row becomes the bottom visible row.
1705
1706       registerDataType(This, TypeName, Renderer, Editor) -> ok
1707
1708              Types:
1709
1710                 This = wxGrid()
1711                 TypeName = unicode:chardata()
1712                 Renderer = wxGridCellRenderer:wxGridCellRenderer()
1713                 Editor = wxGridCellEditor:wxGridCellEditor()
1714
1715              Register a new data type.
1716
1717              The  data  types allow to naturally associate specific renderers
1718              and editors to the cells containing values of  the  given  type.
1719              For  example,  the grid automatically registers a data type with
1720              the name wxGRID_VALUE_STRING which uses wxGridCellStringRenderer
1721              and wxGridCellTextEditor as its renderer and editor respectively
1722              - this is the data type used by all the cells of the default wx‐
1723              GridStringTable  (not  implemented  in wx), so this renderer and
1724              editor are used by default for all grid cells.
1725
1726              However if a custom table returns wxGRID_VALUE_BOOL from its wx‐
1727              GridTableBase::GetTypeName()  (not  implemented  in  wx) method,
1728              then wxGridCellBoolRenderer and  wxGridCellBoolEditor  are  used
1729              for  it because the grid also registers a boolean data type with
1730              this name.
1731
1732              And as this mechanism is completely generic,  you  may  register
1733              your own data types using your own custom renderers and editors.
1734              Just remember that the table must identify a cell  as  being  of
1735              the given type for them to be used for this cell.
1736
1737       saveEditControlValue(This) -> ok
1738
1739              Types:
1740
1741                 This = wxGrid()
1742
1743              Sets  the value of the current grid cell to the current in-place
1744              edit control value.
1745
1746              This is called automatically when the grid cursor moves from the
1747              current  cell to a new cell. It is also a good idea to call this
1748              function when closing a grid since any edits to the  final  cell
1749              location will not be saved otherwise.
1750
1751       selectAll(This) -> ok
1752
1753              Types:
1754
1755                 This = wxGrid()
1756
1757              Selects all cells in the grid.
1758
1759       selectBlock(This, TopLeft, BottomRight) -> ok
1760
1761              Types:
1762
1763                 This = wxGrid()
1764                 TopLeft = BottomRight = {R :: integer(), C :: integer()}
1765
1766       selectBlock(This, TopLeft, BottomRight, Options :: [Option]) -> ok
1767
1768              Types:
1769
1770                 This = wxGrid()
1771                 TopLeft = BottomRight = {R :: integer(), C :: integer()}
1772                 Option = {addToSelected, boolean()}
1773
1774              Selects a rectangular block of cells.
1775
1776              If  addToSelected  is  false then any existing selection will be
1777              deselected; if true the column will be added to the existing se‐
1778              lection.
1779
1780       selectBlock(This, TopRow, LeftCol, BottomRow, RightCol) -> ok
1781
1782              Types:
1783
1784                 This = wxGrid()
1785                 TopRow = LeftCol = BottomRow = RightCol = integer()
1786
1787       selectBlock(This, TopRow, LeftCol, BottomRow, RightCol,
1788                   Options :: [Option]) ->
1789                      ok
1790
1791              Types:
1792
1793                 This = wxGrid()
1794                 TopRow = LeftCol = BottomRow = RightCol = integer()
1795                 Option = {addToSelected, boolean()}
1796
1797              Selects a rectangular block of cells.
1798
1799              If  addToSelected  is  false then any existing selection will be
1800              deselected; if true the column will be added to the existing se‐
1801              lection.
1802
1803       selectCol(This, Col) -> ok
1804
1805              Types:
1806
1807                 This = wxGrid()
1808                 Col = integer()
1809
1810       selectCol(This, Col, Options :: [Option]) -> ok
1811
1812              Types:
1813
1814                 This = wxGrid()
1815                 Col = integer()
1816                 Option = {addToSelected, boolean()}
1817
1818              Selects the specified column.
1819
1820              If  addToSelected  is  false then any existing selection will be
1821              deselected; if true the column will be added to the existing se‐
1822              lection.
1823
1824              This  method won't select anything if the current selection mode
1825              is wxGridSelectRows.
1826
1827       selectRow(This, Row) -> ok
1828
1829              Types:
1830
1831                 This = wxGrid()
1832                 Row = integer()
1833
1834       selectRow(This, Row, Options :: [Option]) -> ok
1835
1836              Types:
1837
1838                 This = wxGrid()
1839                 Row = integer()
1840                 Option = {addToSelected, boolean()}
1841
1842              Selects the specified row.
1843
1844              If addToSelected is false then any existing  selection  will  be
1845              deselected; if true the row will be added to the existing selec‐
1846              tion.
1847
1848              This method won't select anything if the current selection  mode
1849              is wxGridSelectColumns.
1850
1851       setCellAlignment(This, Row, Col, Horiz, Vert) -> ok
1852
1853              Types:
1854
1855                 This = wxGrid()
1856                 Row = Col = Horiz = Vert = integer()
1857
1858              Sets the horizontal and vertical alignment for grid cell text at
1859              the specified location.
1860
1861              Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CEN‐
1862              TRE or wxALIGN_RIGHT.
1863
1864              Vertical  alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE
1865              or wxALIGN_BOTTOM.
1866
1867       setCellBackgroundColour(This, Row, Col, Colour) -> ok
1868
1869              Types:
1870
1871                 This = wxGrid()
1872                 Row = Col = integer()
1873                 Colour = wx:wx_colour()
1874
1875              Set the background colour for the given cell or all cells by de‐
1876              fault.
1877
1878       setCellEditor(This, Row, Col, Editor) -> ok
1879
1880              Types:
1881
1882                 This = wxGrid()
1883                 Row = Col = integer()
1884                 Editor = wxGridCellEditor:wxGridCellEditor()
1885
1886              Sets the editor for the grid cell at the specified location.
1887
1888              The grid will take ownership of the pointer.
1889
1890              See  wxGridCellEditor and the overview_grid for more information
1891              about cell editors and renderers.
1892
1893       setCellFont(This, Row, Col, Font) -> ok
1894
1895              Types:
1896
1897                 This = wxGrid()
1898                 Row = Col = integer()
1899                 Font = wxFont:wxFont()
1900
1901              Sets the font for text in the grid cell at the  specified  loca‐
1902              tion.
1903
1904       setCellRenderer(This, Row, Col, Renderer) -> ok
1905
1906              Types:
1907
1908                 This = wxGrid()
1909                 Row = Col = integer()
1910                 Renderer = wxGridCellRenderer:wxGridCellRenderer()
1911
1912              Sets the renderer for the grid cell at the specified location.
1913
1914              The grid will take ownership of the pointer.
1915
1916              See  wxGridCellRenderer  and the overview_grid for more informa‐
1917              tion about cell editors and renderers.
1918
1919       setCellTextColour(This, Row, Col, Colour) -> ok
1920
1921              Types:
1922
1923                 This = wxGrid()
1924                 Row = Col = integer()
1925                 Colour = wx:wx_colour()
1926
1927              Sets the text colour for the given cell.
1928
1929       setCellValue(This, Coords, S) -> ok
1930
1931              Types:
1932
1933                 This = wxGrid()
1934                 Coords = {R :: integer(), C :: integer()}
1935                 S = unicode:chardata()
1936
1937              Sets the string value for the cell at the specified location.
1938
1939              For simple applications where a grid object automatically uses a
1940              default  grid  table  of string values you use this function to‐
1941              gether with getCellValue/3 to access cell values. For more  com‐
1942              plex  applications  where  you  have derived your own grid table
1943              class that contains various data types (e.g. numeric, boolean or
1944              user-defined  custom  types) then you only use this function for
1945              those cells that contain string values.
1946
1947              See wxGridTableBase::CanSetValueAs() (not implemented in wx) and
1948              the overview_grid for more information.
1949
1950       setCellValue(This, Row, Col, S) -> ok
1951
1952              Types:
1953
1954                 This = wxGrid()
1955                 Row = Col = integer()
1956                 S = unicode:chardata()
1957
1958              Sets the string value for the cell at the specified location.
1959
1960              For simple applications where a grid object automatically uses a
1961              default grid table of string values you use  this  function  to‐
1962              gether  with getCellValue/3 to access cell values. For more com‐
1963              plex applications where you have derived  your  own  grid  table
1964              class that contains various data types (e.g. numeric, boolean or
1965              user-defined custom types) then you only use this  function  for
1966              those cells that contain string values.
1967
1968              See wxGridTableBase::CanSetValueAs() (not implemented in wx) and
1969              the overview_grid for more information.
1970
1971       setColAttr(This, Col, Attr) -> ok
1972
1973              Types:
1974
1975                 This = wxGrid()
1976                 Col = integer()
1977                 Attr = wxGridCellAttr:wxGridCellAttr()
1978
1979              Sets the cell attributes for all cells in the specified column.
1980
1981              For more information about controlling grid cell attributes  see
1982              the wxGridCellAttr cell attribute class and the overview_grid.
1983
1984       setColFormatBool(This, Col) -> ok
1985
1986              Types:
1987
1988                 This = wxGrid()
1989                 Col = integer()
1990
1991              Sets the specified column to display boolean values.
1992
1993              See: setColFormatCustom/3
1994
1995       setColFormatNumber(This, Col) -> ok
1996
1997              Types:
1998
1999                 This = wxGrid()
2000                 Col = integer()
2001
2002              Sets the specified column to display integer values.
2003
2004              See: setColFormatCustom/3
2005
2006       setColFormatFloat(This, Col) -> ok
2007
2008              Types:
2009
2010                 This = wxGrid()
2011                 Col = integer()
2012
2013       setColFormatFloat(This, Col, Options :: [Option]) -> ok
2014
2015              Types:
2016
2017                 This = wxGrid()
2018                 Col = integer()
2019                 Option = {width, integer()} | {precision, integer()}
2020
2021              Sets  the specified column to display floating point values with
2022              the given width and precision.
2023
2024              See: setColFormatCustom/3
2025
2026       setColFormatCustom(This, Col, TypeName) -> ok
2027
2028              Types:
2029
2030                 This = wxGrid()
2031                 Col = integer()
2032                 TypeName = unicode:chardata()
2033
2034              Sets the specified column to display data in a custom format.
2035
2036              This method provides an alternative to defining  a  custom  grid
2037              table  which would return typeName from its GetTypeName() method
2038              for the cells in this column: while it doesn't really change the
2039              type of the cells in this column, it does associate the renderer
2040              and editor used for the cells of the specified type with them.
2041
2042              See the overview_grid for more information on working with  cus‐
2043              tom data types.
2044
2045       setColLabelAlignment(This, Horiz, Vert) -> ok
2046
2047              Types:
2048
2049                 This = wxGrid()
2050                 Horiz = Vert = integer()
2051
2052              Sets the horizontal and vertical alignment of column label text.
2053
2054              Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CEN‐
2055              TRE or wxALIGN_RIGHT. Vertical alignment should be  one  of  wx‐
2056              ALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
2057
2058       setColLabelSize(This, Height) -> ok
2059
2060              Types:
2061
2062                 This = wxGrid()
2063                 Height = integer()
2064
2065              Sets the height of the column labels.
2066
2067              If  height  equals  to wxGRID_AUTOSIZE then height is calculated
2068              automatically so that no label  is  truncated.  Note  that  this
2069              could be slow for a large table.
2070
2071       setColLabelValue(This, Col, Value) -> ok
2072
2073              Types:
2074
2075                 This = wxGrid()
2076                 Col = integer()
2077                 Value = unicode:chardata()
2078
2079              Set the value for the given column label.
2080
2081              If  you  are  using  a  custom  grid table you must override wx‐
2082              GridTableBase::SetColLabelValue() (not implemented  in  wx)  for
2083              this to have any effect.
2084
2085       setColMinimalWidth(This, Col, Width) -> ok
2086
2087              Types:
2088
2089                 This = wxGrid()
2090                 Col = Width = integer()
2091
2092              Sets the minimal width for the specified column col.
2093
2094              It  is  usually best to call this method during grid creation as
2095              calling it later will not resize the column to the given minimal
2096              width even if it is currently narrower than it.
2097
2098              width  must  be greater than the minimal acceptable column width
2099              as returned by getColMinimalAcceptableWidth/1.
2100
2101       setColMinimalAcceptableWidth(This, Width) -> ok
2102
2103              Types:
2104
2105                 This = wxGrid()
2106                 Width = integer()
2107
2108              Sets the minimal width to which the user can resize columns.
2109
2110              See: getColMinimalAcceptableWidth/1
2111
2112       setColSize(This, Col, Width) -> ok
2113
2114              Types:
2115
2116                 This = wxGrid()
2117                 Col = Width = integer()
2118
2119              Sets the width of the specified column.
2120
2121       setDefaultCellAlignment(This, Horiz, Vert) -> ok
2122
2123              Types:
2124
2125                 This = wxGrid()
2126                 Horiz = Vert = integer()
2127
2128              Sets the default horizontal and vertical alignment for grid cell
2129              text.
2130
2131              Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CEN‐
2132              TRE or wxALIGN_RIGHT. Vertical alignment should be  one  of  wx‐
2133              ALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
2134
2135       setDefaultCellBackgroundColour(This, Colour) -> ok
2136
2137              Types:
2138
2139                 This = wxGrid()
2140                 Colour = wx:wx_colour()
2141
2142              Sets the default background colour for grid cells.
2143
2144       setDefaultCellFont(This, Font) -> ok
2145
2146              Types:
2147
2148                 This = wxGrid()
2149                 Font = wxFont:wxFont()
2150
2151              Sets the default font to be used for grid cell text.
2152
2153       setDefaultCellTextColour(This, Colour) -> ok
2154
2155              Types:
2156
2157                 This = wxGrid()
2158                 Colour = wx:wx_colour()
2159
2160              Sets the current default colour for grid cell text.
2161
2162       setDefaultEditor(This, Editor) -> ok
2163
2164              Types:
2165
2166                 This = wxGrid()
2167                 Editor = wxGridCellEditor:wxGridCellEditor()
2168
2169              Sets the default editor for grid cells.
2170
2171              The grid will take ownership of the pointer.
2172
2173              See  wxGridCellEditor and the overview_grid for more information
2174              about cell editors and renderers.
2175
2176       setDefaultRenderer(This, Renderer) -> ok
2177
2178              Types:
2179
2180                 This = wxGrid()
2181                 Renderer = wxGridCellRenderer:wxGridCellRenderer()
2182
2183              Sets the default renderer for grid cells.
2184
2185              The grid will take ownership of the pointer.
2186
2187              See wxGridCellRenderer and the overview_grid for  more  informa‐
2188              tion about cell editors and renderers.
2189
2190       setDefaultColSize(This, Width) -> ok
2191
2192              Types:
2193
2194                 This = wxGrid()
2195                 Width = integer()
2196
2197       setDefaultColSize(This, Width, Options :: [Option]) -> ok
2198
2199              Types:
2200
2201                 This = wxGrid()
2202                 Width = integer()
2203                 Option = {resizeExistingCols, boolean()}
2204
2205              Sets the default width for columns in the grid.
2206
2207              This will only affect columns subsequently added to the grid un‐
2208              less resizeExistingCols is true.
2209
2210              If width is less than getColMinimalAcceptableWidth/1,  then  the
2211              minimal acceptable width is used instead of it.
2212
2213       setDefaultRowSize(This, Height) -> ok
2214
2215              Types:
2216
2217                 This = wxGrid()
2218                 Height = integer()
2219
2220       setDefaultRowSize(This, Height, Options :: [Option]) -> ok
2221
2222              Types:
2223
2224                 This = wxGrid()
2225                 Height = integer()
2226                 Option = {resizeExistingRows, boolean()}
2227
2228              Sets the default height for rows in the grid.
2229
2230              This will only affect rows subsequently added to the grid unless
2231              resizeExistingRows is true.
2232
2233              If height is less than getRowMinimalAcceptableHeight/1, then the
2234              minimal acceptable height is used instead of it.
2235
2236       setGridCursor(This, Coords) -> ok
2237
2238              Types:
2239
2240                 This = wxGrid()
2241                 Coords = {R :: integer(), C :: integer()}
2242
2243              Set the grid cursor to the specified cell.
2244
2245              The  grid  cursor indicates the current cell and can be moved by
2246              the user using the arrow keys or the mouse.
2247
2248              Calling this function generates a  wxEVT_GRID_SELECT_CELL  event
2249              and  if  the  event handler vetoes this event, the cursor is not
2250              moved.
2251
2252              This function doesn't make the target call  visible,  use  GoTo‐
2253              Cell() (not implemented in wx) to do this.
2254
2255       setGridCursor(This, Row, Col) -> ok
2256
2257              Types:
2258
2259                 This = wxGrid()
2260                 Row = Col = integer()
2261
2262              Set the grid cursor to the specified cell.
2263
2264              The  grid  cursor indicates the current cell and can be moved by
2265              the user using the arrow keys or the mouse.
2266
2267              Calling this function generates a  wxEVT_GRID_SELECT_CELL  event
2268              and  if  the  event handler vetoes this event, the cursor is not
2269              moved.
2270
2271              This function doesn't make the target call  visible,  use  GoTo‐
2272              Cell() (not implemented in wx) to do this.
2273
2274       setGridLineColour(This, Colour) -> ok
2275
2276              Types:
2277
2278                 This = wxGrid()
2279                 Colour = wx:wx_colour()
2280
2281              Sets the colour used to draw grid lines.
2282
2283       setLabelBackgroundColour(This, Colour) -> ok
2284
2285              Types:
2286
2287                 This = wxGrid()
2288                 Colour = wx:wx_colour()
2289
2290              Sets the background colour for row and column labels.
2291
2292       setLabelFont(This, Font) -> ok
2293
2294              Types:
2295
2296                 This = wxGrid()
2297                 Font = wxFont:wxFont()
2298
2299              Sets the font for row and column labels.
2300
2301       setLabelTextColour(This, Colour) -> ok
2302
2303              Types:
2304
2305                 This = wxGrid()
2306                 Colour = wx:wx_colour()
2307
2308              Sets the colour for row and column label text.
2309
2310       setMargins(This, ExtraWidth, ExtraHeight) -> ok
2311
2312              Types:
2313
2314                 This = wxGrid()
2315                 ExtraWidth = ExtraHeight = integer()
2316
2317              Sets the extra margins used around the grid area.
2318
2319              A  grid  may  occupy more space than needed for its data display
2320              and this function allows setting how big this extra space is
2321
2322       setReadOnly(This, Row, Col) -> ok
2323
2324              Types:
2325
2326                 This = wxGrid()
2327                 Row = Col = integer()
2328
2329       setReadOnly(This, Row, Col, Options :: [Option]) -> ok
2330
2331              Types:
2332
2333                 This = wxGrid()
2334                 Row = Col = integer()
2335                 Option = {isReadOnly, boolean()}
2336
2337              Makes the cell at the specified location read-only or editable.
2338
2339              See: isReadOnly/3
2340
2341       setRowAttr(This, Row, Attr) -> ok
2342
2343              Types:
2344
2345                 This = wxGrid()
2346                 Row = integer()
2347                 Attr = wxGridCellAttr:wxGridCellAttr()
2348
2349              Sets the cell attributes for all cells in the specified row.
2350
2351              The grid takes ownership of the attribute pointer.
2352
2353              See the wxGridCellAttr class for more information about control‐
2354              ling cell attributes.
2355
2356       setRowLabelAlignment(This, Horiz, Vert) -> ok
2357
2358              Types:
2359
2360                 This = wxGrid()
2361                 Horiz = Vert = integer()
2362
2363              Sets the horizontal and vertical alignment of row label text.
2364
2365              Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CEN‐
2366              TRE or wxALIGN_RIGHT. Vertical alignment should be  one  of  wx‐
2367              ALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
2368
2369       setRowLabelSize(This, Width) -> ok
2370
2371              Types:
2372
2373                 This = wxGrid()
2374                 Width = integer()
2375
2376              Sets the width of the row labels.
2377
2378              If  width  equals wxGRID_AUTOSIZE then width is calculated auto‐
2379              matically so that no label is truncated. Note that this could be
2380              slow for a large table.
2381
2382       setRowLabelValue(This, Row, Value) -> ok
2383
2384              Types:
2385
2386                 This = wxGrid()
2387                 Row = integer()
2388                 Value = unicode:chardata()
2389
2390              Sets the value for the given row label.
2391
2392              If  you  are  using  a  derived grid table you must override wx‐
2393              GridTableBase::SetRowLabelValue() (not implemented  in  wx)  for
2394              this to have any effect.
2395
2396       setRowMinimalHeight(This, Row, Height) -> ok
2397
2398              Types:
2399
2400                 This = wxGrid()
2401                 Row = Height = integer()
2402
2403              Sets the minimal height for the specified row.
2404
2405              See setColMinimalWidth/3 for more information.
2406
2407       setRowMinimalAcceptableHeight(This, Height) -> ok
2408
2409              Types:
2410
2411                 This = wxGrid()
2412                 Height = integer()
2413
2414              Sets the minimal row height used by default.
2415
2416              See setColMinimalAcceptableWidth/2 for more information.
2417
2418       setRowSize(This, Row, Height) -> ok
2419
2420              Types:
2421
2422                 This = wxGrid()
2423                 Row = Height = integer()
2424
2425              Sets the height of the specified row.
2426
2427              See setColSize/3 for more information.
2428
2429       setScrollLineX(This, X) -> ok
2430
2431              Types:
2432
2433                 This = wxGrid()
2434                 X = integer()
2435
2436              Sets the number of pixels per horizontal scroll increment.
2437
2438              The default is 15.
2439
2440              See: getScrollLineX/1, getScrollLineY/1, setScrollLineY/2
2441
2442       setScrollLineY(This, Y) -> ok
2443
2444              Types:
2445
2446                 This = wxGrid()
2447                 Y = integer()
2448
2449              Sets the number of pixels per vertical scroll increment.
2450
2451              The default is 15.
2452
2453              See: getScrollLineX/1, getScrollLineY/1, setScrollLineX/2
2454
2455       setSelectionBackground(This, C) -> ok
2456
2457              Types:
2458
2459                 This = wxGrid()
2460                 C = wx:wx_colour()
2461
2462              Set the colour to be used for drawing the selection background.
2463
2464       setSelectionForeground(This, C) -> ok
2465
2466              Types:
2467
2468                 This = wxGrid()
2469                 C = wx:wx_colour()
2470
2471              Set the colour to be used for drawing the selection foreground.
2472
2473       setSelectionMode(This, Selmode) -> ok
2474
2475              Types:
2476
2477                 This = wxGrid()
2478                 Selmode = wx:wx_enum()
2479
2480              Set the selection behaviour of the grid.
2481
2482              The  existing  selection is converted to conform to the new mode
2483              if possible and discarded otherwise  (e.g.  any  individual  se‐
2484              lected  cells are deselected if the new mode allows only the se‐
2485              lection of the entire rows or columns).
2486
2487       showCellEditControl(This) -> ok
2488
2489              Types:
2490
2491                 This = wxGrid()
2492
2493              Displays the active in-place cell edit control for  the  current
2494              cell after it was hidden.
2495
2496              This method should only be called after calling hideCellEditCon‐
2497              trol/1, to start editing the current grid cell use enableCellEd‐
2498              itControl/2 instead.
2499
2500       xToCol(This, X) -> integer()
2501
2502              Types:
2503
2504                 This = wxGrid()
2505                 X = integer()
2506
2507       xToCol(This, X, Options :: [Option]) -> integer()
2508
2509              Types:
2510
2511                 This = wxGrid()
2512                 X = integer()
2513                 Option = {clipToMinMax, boolean()}
2514
2515              Returns  the column at the given pixel position depending on the
2516              window.
2517
2518              Return: The column index or wxNOT_FOUND.
2519
2520       xToEdgeOfCol(This, X) -> integer()
2521
2522              Types:
2523
2524                 This = wxGrid()
2525                 X = integer()
2526
2527              Returns the column whose right hand edge is close to  the  given
2528              logical x position.
2529
2530              If  no  column  edge is near to this position wxNOT_FOUND is re‐
2531              turned.
2532
2533       yToEdgeOfRow(This, Y) -> integer()
2534
2535              Types:
2536
2537                 This = wxGrid()
2538                 Y = integer()
2539
2540              Returns the row whose bottom edge is close to the given  logical
2541              y position.
2542
2543              If no row edge is near to this position wxNOT_FOUND is returned.
2544
2545       yToRow(This, Y) -> integer()
2546
2547              Types:
2548
2549                 This = wxGrid()
2550                 Y = integer()
2551
2552       yToRow(This, Y, Options :: [Option]) -> integer()
2553
2554              Types:
2555
2556                 This = wxGrid()
2557                 Y = integer()
2558                 Option = {clipToMinMax, boolean()}
2559
2560              Returns  the  grid row that corresponds to the logical y coordi‐
2561              nate.
2562
2563              The parameter gridWindow is new since wxWidgets 3.1.3. If it  is
2564              specified, i.e. non-NULL, only the cells of this window are con‐
2565              sidered, i.e. the function returns wxNOT_FOUND if y  is  out  of
2566              bounds.
2567
2568              If  gridWindow is NULL, the function returns wxNOT_FOUND only if
2569              there is no row at all at the y position.
2570
2571
2572
2573wxWidgets team.                    wx 2.1.4                          wxGrid(3)
Impressum