Commit Graph

464 Commits

Author SHA1 Message Date
Vadim Zeitlin
e81fa3850e 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/trunk@50998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-03 00:52:42 +00:00
Vadim Zeitlin
66a9201df8 implement wxListCtrl::ScrollList() (in report view and vertical direction only) (slightly modified patch 1843647)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-22 15:58:38 +00:00
Stefan Csomor
e51bc1ec1a font updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-01 05:21:11 +00:00
Paul Cornett
915bd4e484 build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-20 16:55:36 +00:00
Stefan Csomor
9553702e46 mac cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-20 16:21:04 +00:00
Vadim Zeitlin
b6423e8be3 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/trunk@49590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-01 20:41:30 +00:00
Robert Roebling
ce0cf2b871 Make wxRenderer::DrawItemSelectionRect() draw a focus outline of wxCONTROL_CURRENT and wxCONTROL_FOCUSED is given, blind patch for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-17 20:57:01 +00:00
Robin Dunn
35a7f94b94 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/trunk@49094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-08 22:29:58 +00:00
Robert Roebling
fc694caa0a Let wxListCtrl generate the context menu event itself
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-19 11:35:39 +00:00
Robert Roebling
edddffb58b Correct GetLabelItemRect to not include image (as per 2.8 branch)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-15 11:05:38 +00:00
Robert Roebling
ca06242be7 Fix ending label-editing bug when clicking elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-14 07:58:06 +00:00
Vadim Zeitlin
5595181f48 add wxSYS_DCLICK_TIME system metric constant; use it for the generic list control rename timer interval (patch 1782472)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-09 22:57:12 +00:00
Robert Roebling
b46ea7825d use live header button update when resizing, no XOR line
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 11:59:52 +00:00
Robert Roebling
36a03ed8c3 Removed gaps between header buttons and the strange header offset
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 10:48:43 +00:00
Vadim Zeitlin
6ac902639c call SetCanFocus(false) to prevent the control window itself from getting focus, only m_mainWin should have it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-11 23:16:26 +00:00
Vadim Zeitlin
0a904ed2c8 generate wxEVT_COMMAND_LIST_END_LABEL_EDIT event even if label didn't change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 14:58:44 +00:00
Vadim Zeitlin
6b06a7271f reset selection when sorting the items as they don't make sense after items change order any more and not doing this could also result in having more than one selected item in a single selection control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-05 22:50:21 +00:00
Vadim Zeitlin
a9aead31d6 don't allow selecting multiple items in single selection control by changing the focused item with Ctrl-arrows and then pressing Space
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-05 22:44:33 +00:00
Robert Roebling
a70598d58e upport wxListCtrl label edit changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-03 12:10:04 +00:00
Robert Roebling
602e33659e Let GtkScrolledWindow handle scroll wheel events.
Reset visible range in wxListCtrl after scrolling.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-03 11:17:40 +00:00
Robert Roebling
696a18c7e7 Correct gridlines drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-22 10:11:47 +00:00
Vadim Zeitlin
9fcd0bf7f3 added wxListCtrl::SetItemPtrData()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-10 01:53:21 +00:00
Vadim Zeitlin
d63c9ecf46 take images and margins into account when setting column width to wxLIST_AUTOSIZE_USEHEADER (patch 1664598)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:30:14 +00:00
Vadim Zeitlin
936632d3b2 clip column image (and not only the text) to the column width (patch 1664588)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 22:26:54 +00:00
Vadim Zeitlin
359fb29e43 merge multiple lines into one as otherwise the display is corrupted/unreadable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 19:40:08 +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
Robert Roebling
49e74855af More RTL work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-13 22:20:10 +00:00