View Issue Details

IDProjectCategoryView StatusLast Update
0004729JEDI VCL00 JVCL Componentspublic2009-07-03 17:15
ReporterDeathMADAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0004729: TJvMainMenu, TJvPopupMenu -> OnGetItemParams -> Graphic - don't draw image on item if item.Enabled = False
Descriptionprocedure TForm1.Popup1GetItemParams(Sender: TMenu; Item: TMenuItem; State: TMenuOwnerDrawState; AFont: TFont; var Color: TColor;
  var Graphic: TGraphic; var NumGlyphs: Integer);
begin
 if Item.Enabled then
   Graphic := bmp1
 else
   Graphic := bmp2;
end;

bmp2 newer draw.
TagsNo tags attached.

Activities

obones

2009-04-06 08:52

administrator   ~0015389

Please provide the zipped sources of a sample application showing this.

2009-04-06 09:19

 

BugExample1.7z (2,324 bytes)

DeathMAD

2009-04-06 09:20

reporter   ~0015391

In truth,image draws, but, in very ugly, masked view;

obones

2009-04-29 14:49

administrator   ~0015475

So what do you want as a drawing?

DeathMAD

2009-04-29 22:00

reporter   ~0015498

I want see my bmp2, untouched. But I think drawed bmp1 in masked mode, ignoring code in GetItemParams.

DeathMAD

2009-04-29 22:04

reporter   ~0015499

I my sample, I can't see
that bitmap in MainMenu

 "bmp_d.LoadFromResourceName(GetModuleHandle(nil),'Bitmap_RemoveD');"

but I see that bitmap in placed of form

 "JvImage1.Picture.Assign(bmp_d);"

DeathMAD

2009-06-07 17:37

reporter   ~0015627

Any news?

I think, it must be documented - order of set image in menu item. There is 4 methods - 1) ImageList and Index, Bitmap property, SubItems ImageList and OnGetItemParams Event. IMHO if in event function I set image => all another ways must be ignored.

obones

2009-07-03 17:15

administrator   ~0015757

I'm sorry, but there won't be any change for this.
What you should be doing is a single bitmap with the two glyphs side by side, and then set the NumGlyphs parameter to 2 inside the event.
This is the way glyphs are used in many other components, so this is the way the menus are behaving.

Issue History

Date Modified Username Field Change
2009-04-05 00:44 DeathMAD New Issue
2009-04-06 08:52 obones Note Added: 0015389
2009-04-06 08:52 obones Status new => feedback
2009-04-06 09:19 DeathMAD File Added: BugExample1.7z
2009-04-06 09:20 DeathMAD Note Added: 0015391
2009-04-29 14:49 obones Note Added: 0015475
2009-04-29 22:00 DeathMAD Note Added: 0015498
2009-04-29 22:04 DeathMAD Note Added: 0015499
2009-06-07 17:37 DeathMAD Note Added: 0015627
2009-07-03 17:15 obones Note Added: 0015757
2009-07-03 17:15 obones Status feedback => resolved
2009-07-03 17:15 obones Resolution open => won't fix
2009-07-03 17:15 obones Assigned To => obones