Commit Graph

465 Commits

Author SHA1 Message Date
Vadim Zeitlin
00a6c15a74 fix view rectangle calculation for the control with scrollbars (#9467)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-03 12:15:30 +00:00
Vadim Zeitlin
e95308c0ae set wxKeyEvent::m_uniChar correctly in the events generated by generic wxListCtrl (#4581)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-13 18:16:38 +00:00
Vadim Zeitlin
924d65ee97 don't clear the list control when wxLC_[HV]RULES style is toggled (#4688)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-13 22:38:33 +00:00
Vadim Zeitlin
61afd24c7a revert r52151, apparently it doesn't work in 2.8 (see patch 1939287)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-11 19:50:42 +00:00
Vadim Zeitlin
2603810965 clip the text in report mode to prevent it from overflowing into the next column (patch 1898914)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-27 18:00:30 +00:00
Vadim Zeitlin
bf37d5c83e also scroll vertically if necessary in MoveToItem() when the control is in a non-report mode (based on patch 1857650)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-03 00:52:42 +00:00
Vadim Zeitlin
355d2bbff0 implement wxListCtrl::ScrollList() (in report view and vertical direction only) (slightly modified patch 1843647)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-22 15:58:38 +00:00
Vadim Zeitlin
481697d020 don't crash in HiglightAll() (called, in particular, from SortItems()) when the control is empty (patch 1821550)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-01 20:41:30 +00:00
Robin Dunn
a2d954469d On Mac the first visible line needs to be recalculated after the Scroll because it can be set
to the wrong value in Scroll because of the paint event generated by the Update() there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-08 22:28:33 +00:00
Robin Dunn
fc75d58855 don't overdo the clipping otherwise we truncate descenders in the header label on OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-25 23:13:21 +00:00
Robert Roebling
75c048e209 Let wxListCtrl generate the context menu event itself
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-19 11:34:39 +00:00
Robert Roebling
2b4dbe37c7 Remove debug code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-14 12:19:00 +00:00
Robert Roebling
deb64c34ff Fix ending label-editing bug when clicking elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-14 07:57:21 +00:00
Robert Roebling
219d29fe36 use live header button update when resizing, no XOR line
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 12:23:19 +00:00
Robert Roebling
46b598d49b Removed gaps between header buttons and the strange header offset
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 10:46:12 +00:00
Vadim Zeitlin
49266c6b45 generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change [backport of rev 47265 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 15:00:42 +00:00
Vadim Zeitlin
fedc6cd535 prevent a single selection control from having multiple selected items [backport of 47175 and 47176 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-05 22:52:30 +00:00
Robert Roebling
804ce4d2b2 Use the same 250ms when waiting for slow-clicks for starting
the edit label process in wxTreeCtrl and wxListCtrl.
Take icon size in the first column into account when shwoing
   text control.
Only activate label editing when clicked on the first label,
   not somewhere else


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-03 12:00:58 +00:00
Robert Roebling
b1a7ff6ca0 Move visible scroll range after scrolling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@47094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-03 11:10:58 +00:00
Robert Roebling
7887fa4046 Only apply wxALWAYS_SHOW_SB to main window in wxListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-22 12:17:49 +00:00
Robert Roebling
29c30ff8f2 Correct grid lines in wxListCtrl (I cannot find the
bug report anymore)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-22 10:09:48 +00:00
Stefan Csomor
d3521487d4 universal os x fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 04:05:37 +00:00
Vadim Zeitlin
9ae4fd9db4 added wxListCtrl::SetItemPtrData() to allow associating pointers with items under 64 bit architectures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-10 02:02:21 +00:00
Vadim Zeitlin
4c4850d399 take images and margins into account when setting column width to wxLIST_AUTOSIZE_USEHEADER (patch 1664598) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:32:42 +00:00
Vadim Zeitlin
d79446e3ce clip column image (and not only the text) to the column width (patch 1664588) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:28:30 +00:00
Vadim Zeitlin
bd2720af3c merge multiple lines into one as otherwise the display is corrupted/unreadable [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 19:41:49 +00:00
Kevin Ollivier
ed9a7a63b8 Generic list and tree ctrl should not use the focused selection color when the top level window is not active.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 01:15:20 +00:00
Vadim Zeitlin
a502b2841d fix a problem with (sometimes) editing an invalid item in EditLabel() (Tim Kosse)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-04 17:07:57 +00:00
Vadim Zeitlin
6fef2483d9 stop the rename timer when the current item changes (Tim Kosse)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-03 14:19:42 +00:00
Robin Dunn
8d4b048e27 Ensure that the listctrl takes the focus on left-click
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-01 23:51:49 +00:00
Kevin Ollivier
bb29edfaa2 Allow wxGenericListCtrl to correctly handle Get/SetScrollPos [bug 1584099].
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-01 20:31:25 +00:00
Robert Roebling
2373946593 Simpler version of [ 1604590 ] wxListCtrl::FindItem & wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-29 21:10:21 +00:00
Kevin Ollivier
9fe25f1329 Propagate key up events to the wxGenericListCtrl parent, like we do with key down and char events.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-28 04:52:21 +00:00
Kevin Ollivier
df0edf4443 Have wxGenericListCtrl record and store the selection state of each column, and on OS X, use this to correctly draw selected headers. Also, move to DrawItemSelectionRect for drawing the background selection.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-19 06:32:08 +00:00
Robert Roebling
05d9753817 Just use the already existing wxRenderer::DrawItemSelectionRect()
from wxListCtrl and wxTreeCtrl; and document it...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-14 10:20:38 +00:00
Robert Roebling
a95d5751f9 Send delete item event just before the item is actually
deleted (as per wxMSW). Also include the client data
   (long value) in the event.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-12 13:27:13 +00:00
Julian Smart
6cd5337946 Fix for GTK+1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-12 12:47:12 +00:00
Robert Roebling
ccdbdc8936 Added native selection rectangle drawing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-11 00:22:20 +00:00
Kevin Ollivier
d6d8b17280 On Mac, when selection is drawn in grey (i.e. unfocused), text color needs to be black.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-09 20:15:18 +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
a685dd314c remove unneeded WXDLLEXPORTs for the classes only used inside the implementation and so not needing to be exported
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-28 20:46:25 +00:00
Kevin Ollivier
4b8fa6349a Use the same selection highlight and text colors as native list/tree controls (i.e. Finder) do. Also, for wxTreeCtrl, enable wxTR_FULL_ROW_HIGHLIGHT when the default style is used, again to match OS LNF.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-24 00:23:37 +00:00
Robin Dunn
6d6d86a684 Avoid nested DC assert
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-21 01:17:21 +00:00
Robin Dunn
c18fa7a4b6 Merge new item attributes if any are already existing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-16 18:13:55 +00:00
Paul Cornett
f7354d9269 univ build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-03 19:06:57 +00:00
Paul Cornett
e409b62aaf listctrl header cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 17:38:30 +00:00
Kevin Ollivier
8a3e173a02 Remove duplication in wxImageList defines and always default to using the native wxImageList when available, even for wxGenericListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-18 04:41:09 +00:00
Kevin Ollivier
e2bc1d6981 Initial commit of native OS X list ctrl support. Compile tested on Win, Mac, FC4/GTK2. Tested samples on Win and OS X. Also, support for co-existance of native and generic list ctrl on OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-17 01:20:08 +00:00
Robert Roebling
807a572ef4 Next round of RTL fixes. This change greatly simplifes
the code and makes most #ifdefs redundant.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-16 21:44:21 +00:00
Robert Roebling
5eefe02976 More RTL fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-14 19:24:41 +00:00