From 95039b7059012bfc5898873a24e742711027d07a Mon Sep 17 00:00:00 2001 From: topic2k Date: Fri, 1 May 2020 11:51:29 +0200 Subject: [PATCH] new agwFlag ULC_NO_ITEM_DRAG Disable item dragging --- wx/lib/agw/ultimatelistctrl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py index 6389fd26..d298565b 100644 --- a/wx/lib/agw/ultimatelistctrl.py +++ b/wx/lib/agw/ultimatelistctrl.py @@ -169,6 +169,7 @@ Window Styles Hex Value Description ``ULC_NO_FULL_ROW_SELECT`` 0x40000000 When an item is selected, the only the item in the first column is highlighted. ``ULC_FOOTER`` 0x80000000 Show a footer too (only when header is present). ``ULC_USER_ROW_HEIGHT`` 0x100000000 Allows to set a custom row height (one value for all the items, only in report mode). +``ULC_NO_ITEM_DRAG`` 0x200000000 Disable item dragging =============================== =========== ==================================================================================================== @@ -295,6 +296,7 @@ ULC_HEADER_IN_ALL_VIEWS = 0x20000000 # Show column headers in all view modes ULC_NO_FULL_ROW_SELECT = 0x40000000 # When an item is selected, the only the item in the first column is highlighted ULC_FOOTER = 0x80000000 # Show a footer too (only when header is present) ULC_USER_ROW_HEIGHT = 0x100000000 # Allows to set a custom row height (one value for all the items, only in report mode). +ULC_NO_ITEM_DRAG = 0x200000000 # Disable item dragging ULC_MASK_TYPE = ULC_ICON | ULC_SMALL_ICON | ULC_LIST | ULC_REPORT | ULC_TILE ULC_MASK_ALIGN = ULC_ALIGN_TOP | ULC_ALIGN_LEFT @@ -5995,6 +5997,7 @@ class UltimateListMainWindow(wx.ScrolledWindow): ``ULC_NO_FULL_ROW_SELECT`` 0x40000000 When an item is selected, the only the item in the first column is highlighted. ``ULC_FOOTER`` 0x80000000 Show a footer too (only when header is present). ``ULC_USER_ROW_HEIGHT`` 0x100000000 Allows to set a custom row height (one value for all the items, only in report mode). + ``ULC_NO_ITEM_DRAG`` 0x200000000 Disable item dragging =============================== =========== ==================================================================================================== :param `name`: the window name. @@ -7570,6 +7573,9 @@ class UltimateListMainWindow(wx.ScrolledWindow): if event.Dragging(): + if self.HasAGWFlag(ULC_NO_ITEM_DRAG): + return + if not self._isDragging: if self._lineLastClicked == -1 or not hitResult or not theItem or not theItem.IsEnabled():