#19263: Calling SetToolTip on wxListCtrl clears checkbox flag

15 views
Skip to first unread message

wxTrac

unread,
Sep 19, 2021, 1:35:02 PM9/19/21
to wx-...@googlegroups.com
#19263: Calling SetToolTip on wxListCtrl clears checkbox flag
---------------------+--------------------
Reporter: dconnet | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.5
Keywords: | Blocked By:
Blocking: | Patch: 0
---------------------+--------------------
{{{
auto ctrl = new wxListCtrl...
ctrl->EnableCheckBoxes(true);
ctrl->SetToolTip(_("Tippy"));
}}}

will result in checkboxes being disabled.

Workaround: Call EnabledCheckBoxes after SetToolTip

Only tested on MSW.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19263>

wxTrac

unread,
Sep 19, 2021, 2:01:07 PM9/19/21
to wx-...@googlegroups.com
#19263: Calling SetToolTip on wxListCtrl clears checkbox flag
----------------------+-------------------------------
Reporter: dconnet | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.5
Resolution: | Keywords: simple wxListCtrl
Blocked By: | Blocking:
Patch: 0 |
----------------------+-------------------------------
Changes (by vadz):

* keywords: => simple wxListCtrl
* status: new => confirmed


Comment:

Oops, indeed, `SetToolTip()` calls `MSWSetExListStyles()` and this doesn't
take `LVS_EX_CHECKBOXES` into account.

Note that the same thing is going to happen in `SetWindowStyleFlag()` too,
so `MSWSetExListStyles()` should be modified to preserve
`LVS_EX_CHECKBOXES` if it's already set. This should be simple to do if
anybody has 10 minutes to test it...

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19263#comment:1>

wxTrac

unread,
Oct 17, 2021, 9:44:34 AM10/17/21
to wx-...@googlegroups.com
#19263: Calling SetToolTip on wxListCtrl clears checkbox flag
----------------------+------------------------------------------
Reporter: dconnet | Owner: Maarten Bent <MaartenBent@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.5
Resolution: fixed | Keywords: simple wxListCtrl
Blocked By: | Blocking:
Patch: 0 |
----------------------+------------------------------------------
Changes (by Maarten Bent <MaartenBent@…>):

* owner: => Maarten Bent <MaartenBent@…>
* status: confirmed => closed
* resolution: => fixed


Comment:

In [changeset:"fef2d7d05b92c5429bc7f0c8195846f733feee46/git-wxWidgets"
fef2d7d05/git-wxWidgets]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="fef2d7d05b92c5429bc7f0c8195846f733feee46"
Fix wxListCtrl checkbox style when reapplying extended styles

Fixes #19263
}}}

--
Ticket URL: <https://trac.wxwidgets.org/ticket/19263#comment:2>
Reply all
Reply to author
Forward
0 new messages