#18473 closed defect (fixed)

Edit box of wxDataViewCtrl shifted right

Reported by: wangqr Owned by: Vadim Zeitlin <vadim@…>
Priority: normal Milestone:
Component: wxMSW Version: 3.1.2
Keywords: Cc: i@…
Blocked By: Blocking:
Patch: yes

Description

When editing items in wxDataViewCtrl, the text box is not aligned with the original text shown in wxDataViewCtrl, but shifted right. So user can see part of the original text.

In 3.0.4, the text is also shifted right slightly, but it does cover the original text. So it looks fine to me.

The screenshot is taken from the unmodified dataview sample.

Attachments (1)

wxdataview_edit.png download (21.4 KB) - added by wangqr 12 months ago.

Download all attachments as: .zip

Change History (4)

Changed 12 months ago by wangqr

comment:1 Changed 12 months ago by wangqr

  • Cc i@… added

Bisect says 8f386265dc0db1b96d435c83cd1aaca5c2e9cdaa is the first bad commit. It seems that in this commit, the width of the expander is modified, but in some places m_lineHeight is still used as the width of the expander.

comment:2 Changed 12 months ago by wangqr

  • Patch set

Created PR #1508 on this issue.

comment:3 Changed 12 months ago by Vadim Zeitlin <vadim@…>

  • Owner set to Vadim Zeitlin <vadim@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 0ea436616/git-wxWidgets:

Fix the width of expander in wxDataViewCtrl

In 8f386265dc0db1b96d435c83cd1aaca5c2e9cdaa, the width of a tree
expander is changed to the native value on the platform. But some
calculations still use guessed value (m_lineHeight) as the width. This
fixes the value, by retrieving the width using the same method as in
OnPaint().

Closes https://github.com/wxWidgets/wxWidgets/pull/1508

Closes #18473.

Note: See TracTickets for help on using tickets.