Commit Graph

432 Commits

Author SHA1 Message Date
Stefan Neis
c35a95c75d Fixed problems with reassigning the already assigned attribute, see #9567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-15 17:26:31 +00:00
Stefan Neis
906ecfa15d Added missing screen update on deselection in wxGrid (ticket #4212, part1).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-15 14:10:41 +00:00
Vadim Zeitlin
e81695562e fix reference counting problems with wxGridCellWithAttr (re-#9567)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-13 21:37:58 +00:00
Vadim Zeitlin
3a020570cd fix crash which happened if you called SetAttr(NULL) followed by SetAttr(attr) (#9567)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-12 23:58:19 +00:00
Vadim Zeitlin
c18b12458f don't refresh the current cell in SetCellHighlightROPenWidth() if it's invalid (#9523)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-07 02:09:03 +00:00
Vadim Zeitlin
78de549990 use wxTE_PROCESS_{ENTER,TAB} with the wxGridCellChoiceEditor combobox (slightly modified patch 1906581)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-15 02:24:12 +00:00
Vadim Zeitlin
c0e61743de use extra parentheses to fix Borland problems with operator?:
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-09 12:59:26 +00:00
Vadim Zeitlin
918a6614fa another correction to indices used in StringToLines()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 23:43:58 +00:00
Vadim Zeitlin
c0d550ed92 correct indices used in StringToLines() (modified patch 1882985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 21:06:17 +00:00
Vadim Zeitlin
3aac5b45ea don't use negative sizes for row/column labels subwindows to avoid GTK warnings (patch 1878512)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-03 14:11:24 +00:00
Václav Slavík
2ce6b01ba5 wxGrid focus handling fixes:
- don't allow focus in helper labels subwindows
- draw selection in different colour when not focused
- hide cursor/highlight when not focused



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-21 17:16:15 +00:00
Václav Slavík
d2e72b6805 ensure that wxGrid::AutoSizeColumn/Row() never sets column/row size smaller than the minimal size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-24 17:55:14 +00:00
Václav Slavík
c25ddfa8a3 backported wxGrid labels autosizing patch (r44835) to 2.8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-23 21:21:25 +00:00
Vadim Zeitlin
20d78b39b2 don't capture the mouse when just moving it in the grid (replaces patch 1779923) [backport of r50010 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-19 13:14:54 +00:00
Julian Smart
06e3372526 Avoid a crash due to OnSize being called before initialisation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-11 08:32:10 +00:00
Robin Dunn
94384f859f Oops, put the WXUNUSED in the wrong spot.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-01 19:45:38 +00:00
Robin Dunn
9e20de35b1 Backport change to wxGrid::OnSize so both subwindow sizes and
scrollars will be adjusted.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-01 19:41:52 +00:00
Robin Dunn
c92bd38c72 ensure there is a current cell before using it to try and get width/height
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-26 00:15:42 +00:00
Vadim Zeitlin
cefb28b4d7 don't delete inexistent column indices in DeleteCols() [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-16 17:43:39 +00:00
Robin Dunn
b80e33a799 Don't capture the mouse until after we're sure we're not sending
wxEVT_GRID_CELL_BEGIN_DRAG


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-01 22:52:01 +00:00
Stefan Neis
a7dde52f0a Improve resetting table via SetTable (extended version of patch #1636377).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-21 22:39:56 +00:00
Vadim Zeitlin
b8508db8b4 create in place edit control with wxTE_PROCESS_ENTER style as otherwise it's not closed on Enter when used inside a panel or a dialog (which uses Enter for dialog navigation) (patch 1630586)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-14 21:04:27 +00:00
Vadim Zeitlin
2c03d7714c fix attribute memory leak in wxGrid::ShowCellEditControl() (patch 1629949)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 17:09:54 +00:00
Vadim Zeitlin
388703a573 forcefully get rid of the scrollbars in CalcWindowSizes() if we don't need them any more
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-17 02:13:04 +00:00
Vadim Zeitlin
dc4689ef73 correct GetBestSize() to return correct best size, i.e. the same size as AutoSize() would give to the control since the fix in 1.407
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-15 01:09:06 +00:00
Vadim Zeitlin
39621ee0e7 added the missing parameter to SetScrollbars() call in AutoSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-04 10:43:43 +00:00
Vadim Zeitlin
0ed3b81230 fixed long standing bug with Fit() still showing the scrollbars: the old code for rounding up the grid size to a multiple of scroll step was wrong as it did for the grid itself and not just the scrollable area (and also assorted off by 1 errors and a workaround for a bug in wxMSW SetClientSize() implementation whihc may sometimes leave space for unneeded scrollbar)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-03 20:54:04 +00:00
Mattia Barbon
dab61ed75f Use 1 as true and "" as false, not the opposite.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-26 14:22:29 +00:00
Robin Dunn
ecc7aa8203 ensure m_table is not NULL before trying to access the view
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-08 04:54:47 +00:00
Julian Smart
5d38a5f3c1 Improved highlight drawing on wxMac/Core Graphics by not using wxClientDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-06 11:41:02 +00:00
Stefan Csomor
f4f9074f49 fixing region clipping
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-06 08:11:57 +00:00
Vadim Zeitlin
86020f7e33 don't leave tables non-owned by the grid with dangling view pointer when the grid is deleted (patch 1310535)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 13:43:13 +00:00
Vadim Zeitlin
7c3f33a943 grid lines were incorrectly drawn over multicell cells in the last column (bug 1290841)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 12:33:48 +00:00
Robin Dunn
170acdc90e GetBestFittingSize --> GetEffectiveMinSize
SetBestFittingSize --> SetInitialSize
SetBestSize  --> SetInitialSize
SetInitialBestSize --> SetInitialSize


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-31 08:50:17 +00:00
Vadim Zeitlin
8497bbf52d check that the cell using bool editor has a valid value (i.e. either true or false) (last nail in the coffin of the request 1557790)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 01:28:15 +00:00
Vadim Zeitlin
9c71a1386d allow customizing the string values returned by wxGridCellBoolEditor::GetValue() (feature request 1557790)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-28 13:57:38 +00:00
Robert Roebling
e60022505d I don't think anylonger that DrawHeaderButton() should
be used for drawing grid row/col buttons. Also, the
   GTK2 port should not waste space per line of wxMSW
   doesn' waste it neither.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-15 19:44:39 +00:00
Vadim Zeitlin
dfd7c0821a SetOverflow() should be called with a bool argument, not m_overflow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 22:46:15 +00:00
Stefan Neis
eb703a121f Initialize m_overflow in wxGridCellAttr::Clone.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 22:22:24 +00:00
Paul Cornett
4c44eb66f3 put grid string in generic/grid.cpp, not common/datacmn.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 08:12:33 +00:00
Kevin Hock
9d4b8a5d0d When autosizing a row or column (AutoSize____), use GetMultiLineTextExtent to determine header size. Otherwise, the column header widths are artificially inflated, and row header heights are not high enough.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-22 17:20:40 +00:00
Robert Roebling
2121eb69fa Another RTL fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-19 10:42:42 +00:00
Robert Roebling
615b7e6ab0 More wxGrid RTL things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-18 21:02:09 +00:00
Robert Roebling
bcb614b328 More RTL work. Now transform m_updateRegion and
do nothing special in IsExposed() since some
   code may use m_updateRegion directly. Keep
   untransformed version around for use with
   GTK clipping in the DC.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-18 14:29:16 +00:00
Vadim Zeitlin
d3c7fc996a mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-05 20:47:48 +00:00
Stefan Neis
be2e4015f5 Only support detection of "near the edge" coordinates, if dragging grid lines
is actually enabled (Fixes #548106 - Border of grid lines of wx.grid).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-30 22:38:14 +00:00
Michael Wetherell
c2b2c10ed6 Warning fixes for VC5.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-29 09:57:41 +00:00
Vadim Zeitlin
7b34da9bd6 remove debugging printf() from wxGridCellFloatEditor::IsAcceptedKey(); cleaned up the code a bit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-26 13:00:49 +00:00
Vadim Zeitlin
3d3f3e3749 allow customization of individual grid lines appearance (patch 1496015)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-24 23:16:37 +00:00
Robin Dunn
2b73a34e1b properly offset the mouse position for the label window clicks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-06 22:13:24 +00:00