Ticket #11479 (infoneeded_new enhancement)

Opened 4 years ago

Last modified 3 years ago

Fixed accel alignment problem on owner-drawn menu

Reported by: malcompl Owned by:
Priority: normal Milestone: 2.9.1
Component: wxMSW Version: 2.9-svn
Keywords: wxMenu, wxOwnerDrawn Cc:
Blocked By: Patch: no
Blocking:

Description

Correction accel alignment on owner-drawn menu for more native look.

Attachments

alignaccel.patch download (8.9 KB) - added by malcompl 4 years ago.

Change History

Changed 4 years ago by malcompl

Changed 4 years ago by VZ

  • status changed from new to closed
  • resolution set to fixed

(In [62712]) Correct alignment of menu accelerator strings in owner-drawn menus.

Draw them right-aligned as the native menus do.

Closes #11479.

Changed 3 years ago by VZ

(In [63224]) Correct alignment of menu accelerator strings in owner-drawn menus.

Draw them right-aligned as the native menus do.

Closes #11479.

Changed 3 years ago by rk

  • status changed from closed to reopened
  • version set to 2.9-svn
  • resolution deleted
  • patch unset

I don't see the accelerators being right-aligned in my application. The menu sample shows them left-aligned aswell when opening the "File/Standard items demo" menu.
I am on WinXP and have wxUSE_OWNER_DRAWN enabled. Maybe I am doing something wrong?

Changed 3 years ago by vadz

  • status changed from reopened to confirmed
  • milestone set to 2.9.1

This bug can also be seen only under XP (and older systems, presumably). The accelerators are drawn correctly under Win7 but I do see the bug in the menu sample under XP.

Changed 3 years ago by malcompl

This is not a bug, is a native behavior emulation, Windows without themes accelerators aligns to the left, with themes to right. See native menu in sample.

Changed 3 years ago by rk

  • status changed from confirmed to infoneeded_new

You are right. I realized that after investigating the problem described in #11657.
Although, this raises the question: Shouldn't it be possible to force a menu to be owner-drawn other than having to set an image or changing the color of one of its items. The problem is that if I have a menu bar I want all menus to look the same even if I don't use icons/colors in one of them. Maybe we should add a new style flag (wxMENU_OWNERDRAWN) to wxMenu to support that. This should probably become a new ticket.

Note: See TracTickets for help on using tickets.