Commit Graph

29 Commits

Author SHA1 Message Date
Michael Bedward
b0c8fc357c Several ugly hacks to get the bugs table and virtual table demos to
work under wxMotif.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-24 07:42:17 +00:00
Vadim Zeitlin
66b3609e6a mwxLog was leaked - fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-24 00:20:45 +00:00
Robin Dunn
4cfa5de640 Some mouse events need to be handled even when outside the grid.
Added flag and accessors to enable/disable the dragging of the grid
lines.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-23 07:03:56 +00:00
Robin Dunn
ea179c7b4a 1. wxGridCellEditor::SetSize needs to use the wxSIZE_ALLOW_MINUS_ONE
flag otherwise the choice editor will not move to row 1, (the wxRect
given has a -1 y value.)

2. I fixed wxGridCellChoiceEditor::BeginEdit to not only set the
current value into the text field, but also to make it the current
selection in the dropdown.

3. EndEdit was getting called twice for each cell when you leave it
with the TAB or ENTER.  I commented out a call to SaveEditControlValue
in SetCurrentCell to take care of this.  It shouldn't hurt anything
since SaveEditControlValue is also called within the
EnableCellEditControl(FALSE) which gets called next.  If this causes
no problems for anybody it can be removed entirely.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-22 20:02:48 +00:00
Vadim Zeitlin
4ee5fc9c92 added combobox editor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-22 16:57:12 +00:00
Vadim Zeitlin
65e4e78efb column autosizing added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-22 16:03:54 +00:00
Vadim Zeitlin
816be743e8 added renderers/editors for long/float, not fully tested yet, but seems to
work - see the demo in the (updated) sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-22 14:29:41 +00:00
Michael Bedward
dd16fdaeaa Added view menu items to toggle row and col drag-resizing.
Removed setting of cell background colour for the moment.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-22 04:06:58 +00:00
Robin Dunn
f2d7623799 Added ability for tables, grids, editors and renderers to handle nonstring data.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-21 23:17:40 +00:00
Vadim Zeitlin
35f97e951c added "bugs table" which will show non string data support when it's ready
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-21 18:34:30 +00:00
Vadim Zeitlin
439479796a added SetColMinimalWidth()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-21 18:01:45 +00:00
Vadim Zeitlin
1618dca721 make it possible to specify the virtual table size (this makes it easier to
see that the memory taken by the grid doesn't depend on it with top)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-21 17:37:07 +00:00
Vadim Zeitlin
508011ce6c bool editor/renderer added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-17 14:08:27 +00:00
Vadim Zeitlin
b54ba67107 1. EVT_GRID_XXX constants renamed to wxEVT_GRID_XXX
2. EVT_GRID_EDITOR_SHOWN/HIDDEN added
3. Alt-X now work in the grid (instead of being eaten in StartingKey)
4. added CanEnableCellControl() and use it before calling EnableEC


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-17 10:12:48 +00:00
Vadim Zeitlin
283b7808d8 added support for readonly cells and 3d border drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 21:10:45 +00:00
Robin Dunn
4e5b5abbfd Insert row/col now uses the current position to determine where to insert.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-16 17:52:27 +00:00
Robin Dunn
07296f0b12 1. Fixed slow-click timer.
2. Fix for full cell background to be painted.  (One line on the edges
was showing through to the background.)

3. Added current cell highlight.  Currently it just draws a thick
border using the gridLineColour just inside the cell borders.

4. Make dragging a little less sensitive by ensuring that the mouse
drags at least 3 pixels before anything is done to the grid.

5. CaptureMouse while drag-selecting cells and fixed to make cells
visible if dragging outside window boundaries.  Still a problem here
though, it moves way to fast to see what's happening (at least on MSW.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-14 08:53:06 +00:00
Robin Dunn
f97c9b5bf2 1. Grid cell defaults are now handled by an internal
wxGridCellAttr object

2. wxGridCellRenderer::Draw updated to expect an attr object and
use it instead of going back to the grid for everything

3. The selection colours are now initialized from wxSystemSettings,
and are configurable.

4. Now either CreateGrid() or SetTable() can be called to initialize
the grid.  Added a test for using a non-default table.

5. Reduced flicker even more byt using empty EVT_ERASE_BACKGROUND handlers.

6. The beginings of wxGridCellEditor are in there but not activated
yet. (This is the next step.)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-13 05:38:03 +00:00
Vadim Zeitlin
758cbedf84 added attr assignment for rows/columns
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 21:14:58 +00:00
Vadim Zeitlin
ab79958a7f added wxGridCellRenderer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 19:40:56 +00:00
Vadim Zeitlin
2e9a678817 fixed setting more than one attr for a cell
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-11 18:18:18 +00:00
Vadim Zeitlin
b99be8fb78 cell attributes added (doesn't quite work, work in progress, beware, don't use, &c &c)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-09 20:30:27 +00:00
Vadim Zeitlin
f0102d2a6d fixed refresh problem due to rounding errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-04 14:57:09 +00:00
Michael Bedward
f445b8537b Updated demo program to work with revised grid code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-02-03 06:07:07 +00:00
Michael Bedward
c336585eec Added demo of handling EVT_GRID_SELECT_CELL.
A couple of other minor tweaks.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-19 07:27:56 +00:00
Michael Bedward
5795d034f1 Changed all EVT_WXGRID... constants to EVT_GRID...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-14 05:03:00 +00:00
Michael Bedward
0eee528340 Added demonstration of insert/delete rows/cols
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-13 11:57:22 +00:00
Michael Bedward
10434f3c24 Added comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-06 04:58:38 +00:00
Michael Bedward
e442cc0d9d Sample program for new wxGrid classes.
Define wxUSE_NEW_GRID as 1 in setup.h to use the new wxGrid.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-10-06 04:55:17 +00:00