31 Commits

Author SHA1 Message Date
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
cbeytas
7b02c88a28 Merge branch 'master' into treefixes 2021-01-10 03:04:29 +00:00
Robin Dunn
d265d13f6c Spelling fixes in the demo 2020-07-14 12:00:55 -07:00
Per A. Brodtkorb
fc1823315b Fixes issue # 1554:
Replaced "== None" and "!= None" with "is None" and "is not None", respectively, because the former is slower and error-prone.
2020-03-23 11:53:36 +01:00
Robin Dunn
1cbde7b685 Use wx.LIGHT_GREY as the default colour, it is closer to the real default background 2019-10-07 15:33:31 -07:00
Robin Dunn
4fe640b9d5 Leave a bit of space between the controls 2019-10-07 15:18:24 -07:00
Robin Dunn
50b9cfd95a Don't start out with a transparent colour, the ColourDialog on OSX will not change it without extra steps 2019-10-07 15:17:53 -07:00
Robin Dunn
0eba88c53a cockie --> cookie 2019-10-07 15:16:36 -07:00
Pappenreiter.Thomas
5c373dcc67 hypertreelist demo extended 2019-10-07 13:02:42 +02:00
Metallicow
e442736ee3 Fix some sizer issues with wxPy4.1 2019-06-20 19:46:45 -05:00
cbeytas
b7d118df0f Add fullscreen option to CustomTreeCtrl Drag/Drop
Feature addition
Add SetDragFullScreen and GetDragFullScreen methods which changes the
way the simplified drag/drop works in the tree. This flag is passed
to the wx.DragImage.BeginDrag() method when it is called.
Also add this option to HyperTreeList.
Modify the CustomTreeCtrl and HyperTreeList demos so it can be tested.
2019-01-07 00:26:28 -05:00
cbeytas
4ed3e536e5 Add sort icon support to HyperTreeList
Feature addition.
Add SetColumnSortIcon() method to HyperTreeList so that a native sort
arrow can be easily shown in the header columns. For some reason does
not work on GTK (won't draw arrow) but works great on Windows/MacOS.

Modify the demo with LIST_COL_CLICK event options so it can be tested.
2019-01-07 00:23:45 -05:00
cbeytas
ac0f578a01 Fix CustomTreeCtrl/HyperTreeList background color
CustomTreeCtrl and HyperTreeList use wx.SYS_COLOUR_LISTBOX for their
default background colors. This defaults to dank Grey on MSW/GTK/MacOS
even though the TreeCtrl and ListCtrl on all three platforms default
to a white background. Use a trick from UltimateListCtrl to take
default colors from wx.ListCtrl.

This can be seen in the demos, except that the CustomTreeCtrl demo
forces its background to wx.WHITE. With these changes forcing the
background color is no longer necessary and allows the controls to
take on the native background color for themes that change it.
2019-01-07 00:12:00 -05:00
cbeytas
8113033d6e Recalculate CustomTreeCtrl on multiline text
In CustomTreeCtrl and HyperTreeList the SetItemText method recalculates
the size of the item row in which the text was changed. If the number
of lines in the text changes the entire tree must be recalculated
as all items below must be shifted to compensate. This change attempts
to recalculate the entire tree only when necessary (when number of
lines change) in order not to slow down existing code that performs a
lot of SetItemText() operations on an unfrozen tree.

Add a "Change Item Text" option to the CustomTreeCtrl and HyperTreeList
demos so that this can be tested. Before this fix, changing the number
of lines of text in an item would leave gaps or create overlaps
between items in the tree.
2019-01-06 23:47:57 -05:00
cbeytas
70464181c9 Fix tree event exception in HyperTreeList demo
The HyperTreeList demo receives events from an embedded TreeCtrl
window which reports a different item type (TreeItemId) than the
HyperTreeList events (TreeListItem). This throws an exception:
    AttributeError: 'TreeItemId' object has no attribute 'GetText'.
Guard against this by only processing events with TreeListItem items.

To reproduce, start the HyperTreeList demo and expand "item 0-a" then
enable it by clicking the radio button. Selecting any item in the
ListCtrl, or expanding/collapsing a tree node will generate exceptions.
2019-01-06 23:31:59 -05:00
cbeytas
d1361f3d0b Fix bug in HyperTreeList and CustomTreeCtrl demos
Throws ValueError: chr() arg not in range(256) if any special key is
pressed while editing text control.
2018-11-21 15:17:23 -05:00
cbeytas
fb10da6aab Fix typo in CustomTreeCtrl and HyperTreeList demos
Context menu "Change Item Icons" would throw an exception due to typo.
2018-11-21 14:46:06 -05:00
cbeytas
e11848f735 Fix hide items in HypreTreeList
Hiding items was only partially implemented and very buggy.
This feature does not exist in CustomTreeCtrl but I see no reason why
it couldn't be added in the future. This fix requires the arrow key fixes
in order for arrow keys to work reliably in a tree with hidden items.
Hidden items always report they are disabled and not expanded.

Also updates the demo of HyperTreeList to add hide options to context
menu so the feature can be tested.
2018-11-21 14:43:07 -05:00
Robin Dunn
106f2aa733 Merge pull request #1076 from Metallicow/HyperTreeList-Fix
Fix dc.DrawRectangleRect to dc.DrawRectangle

(cherry picked from commit 3aa4f289e9)
2018-11-08 20:10:13 -08:00
Robin Dunn
94f8377b77 Merge pull request #979 from RobinD42/fix-issue973
Optimize line drawing in HyperTreeList
(cherry picked from commit b9e2d4d717)
2018-08-29 23:10:00 -07:00
Robin Dunn
705aa63d75 Merge branch 'more-windowidref' into wxPy-4.0.x
(cherry picked from commit ada7b2fc51)
2018-06-25 19:12:00 -07:00
Robin Dunn
b1b0c9e297 wx.NewId() --> wx.ID_ANY or wx.Window.NewControlId() as appropriate 2018-06-19 10:31:56 -07:00
Metallicow
c273dfa9b1 Trim Trailing Whitespace demos 2016-11-24 19:26:05 -06:00
Robin Dunn
ed4756b902 Remove wx.lib.six and use the stock six module instead,
and add it as an installation dependency.
2016-06-30 20:07:57 -07:00
Steve Barnes
c1d26d1e84 Remaining xrange issues resolved by replacing with range 2016-05-22 14:11:56 +01:00
Robin Dunn
a9595b241a PR64: Various Phoenix and Py3 fixes for the demo and library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 04:48:21 +00:00
Robin Dunn
558fcfa5a3 PR61: Added python shebangs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:44:14 +00:00
Robin Dunn
2bf5a267fa PR58: More fixes for Phoenix deprecations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:20:07 +00:00
Robin Dunn
ea181b5b72 PR57: Mainly style changes, a few white space stuff and an xrange to range change.
* Phoenix FONTFAMILY, STYLE, WEIGHT Fixes
* PENSTYLE_ & BRUSHSTYLE_ Fixes
* Fix FONTWEIGHT to FONTSTYLE typo
* Phoenix Deprecations: wx.OPEN to wx.FD_OPEN
* Phoenix Deprecations: wx.SAVE to wx.FD_SAVE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:19:55 +00:00
Robin Dunn
3fd1f2330b Some HyperTreeList Phoenix Fixes
Some HyperTreeList Phoenix Fixes
Still needs more work

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 22:19:45 +00:00
Robin Dunn
f96e25db1f Copy the wxPython demo from Classic
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 18:24:09 +00:00