Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Standard Controls/TMainMenu    [ Add a report in this area ]  
Report #:  6895   Status: Open
TMenuItem.Checked does not reflect visually if image is used in the menu
Project:  Delphi Build #:  ALL
Version:    15.1 Submitted By:   Ahto Tanner
Report Type:  Basic functionality failure Date Reported:  1/12/2004 3:29:44 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   263520
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (5 Total Ratings)
4.40 out of 5
Total Votes: 16
Description
In Delphi 7 it is impossible to visually see if a menu item is checked or not if it has bitmap assigned.
When an image from image list or Bitmap property is used by a TMenuItem, checked state of the menu item is not visually different from unchecked state. In previous versions of Delphi, bitmap was drawn as "down button" when menu item was checked.

Tested on Windows XP, themes disabled. This problem appears only when themes are disabled, ie. "classic" Windows interface is used.

Update: This problem is also present in Delphi 10 (Turbo Delphi), so seems it has been never fixed.
Steps to Reproduce:
See new attachments (Turbo Delphi).
Workarounds
Patch menus.pas
Attachment
Sample_project_D10.zip
Comments

Ahto Tanner at 10/4/2006 5:18:56 PM -
I reported this problem years ago for Delphi 7 but I was shocked that it also appears in the latest D10 where I upgraded lately. I now added attachment with sample project and a screenshot image for quick overview.

Henrik R. Carlsen at 8/5/2008 3:12:35 AM -
Still not fixed (in D2007)

Alex Reztsov at 10/21/2008 8:25:26 AM -
We are fixed this bug.

1. Copy Menus.pas into your project.
2. Replace next lines

      if Checked or Selected and DrawGlyph then
        if not WinXP then
          DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

with

      if Checked or Selected and DrawGlyph then
//        if not WinXP then  // Polaris
          DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

and other next

      if Checked or Selected and DrawGlyph {and not WinXP} then
        DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

with

      if Checked or Selected and DrawGlyph {and not WinXP} then  // Polaris
        DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

3. Build program. Congratulations.

Niclas Flysjo at 5/12/2011 2:38:55 PM -
Sad to say that this work around do not help me on my Windows-7 with Delphi XE...

This bug is extreamly annoying, and I've been forced to redesign some of my application GUIs, like three times in the past three months because of this.

I would like to know if there are any plans on fixing this issue any time soon?

Tomohiro Takahashi at 5/15/2011 6:04:19 PM -
Unfortunately, this issue is still Open.
So, if possible, could you please contact technical support service. Sorry for inconvenience.
http://support.embarcadero.com/

Tomohiro Takahashi at 5/12/2011 8:48:32 PM -
Thanks for the notification. I will check the internal status.
And, if possible, could you please contact technical support service? Sorry for inconvenience.
http://support.embarcadero.com/

Alexey Lukyanenko at 11/19/2008 12:06:18 AM -
This fix is not usable if project used option "build with runtime packages" checked

Alexey Reztsov at 1/14/2009 7:12:37 AM -
For Delphi 2006 UP 2 can use this build http://www.polesoft.ru/files/vcl100.7z

Alex Reztsov at 10/21/2008 8:27:39 AM -
....ooh

and other next

      if Checked or Selected and DrawGlyph then
        DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

with

      if Checked or Selected and DrawGlyph {and not WinXP} then  // Polaris
        DrawEdge(Handle, GlyphRect, EdgeStyle[Checked], BF_RECT);

....

Tomohiro Takahashi at 8/5/2008 7:57:08 AM -
Thanks for checking this issue.

Server Response from: ETNACODE01