mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-21 19:27:10 +01:00
Fix HyperTreeList headers if child window selected
If a child window is only partially displayed, and it is clicked on, the window will scroll to the right so that it is fully visible. This doesn't send an EVT_SCROLLWIN event which means the column headers don't get updated. As a workaround we manually refresh the headers whenever a child window gets focus. Problem can be seen in the demo by expanding out "item 0-a", enabling it, then clicking on the embedded TreeCtrl. The window will scroll to reveal the entire TreeCtrl, but the column headers won't scroll and will no longer be aligned with the columns of the tree.
This commit is contained in:
@@ -1695,6 +1695,8 @@ class TreeListItem(GenericTreeItem):
|
||||
|
||||
treectrl = self._owner
|
||||
select = treectrl.GetSelection()
|
||||
# Refresh header window since child focus could have moved scrollbars.
|
||||
treectrl.GetParent().GetHeaderWindow().Refresh()
|
||||
|
||||
# If the window is associated to an item that currently is selected
|
||||
# (has focus) we don't kill the focus. Otherwise we do it.
|
||||
|
||||
Reference in New Issue
Block a user