Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005539 [JEDI VCL] 00 JVCL Components trivial always 2011-03-31 17:40 2012-09-10 14:15
Reporter ralfiii View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0005539: TJvPopupMenu.DefaultDrawItem deprecated
Description The code of TJvPopupMenu.DefaultDrawItem is absolutely identical to TJvPopupMenu.DrawItem.

Originally this method was used in OwnerDraw-mode to get the "normal" paint-behaviour (=to get the text drawn) and do some custom painting afterwards, typically it was called from the FOnDrawItem-event.

If you now call that method from the OnDrawItem-Event your code is stuck in an endless loop.

If you look into the original Rx-code from that the TJvPopupMenu
origins, you'll see a line
  if Assigned(FOnDrawItem) then FOnDrawItem(Self, Item, Rect, State)
in .DrawItem but this line is missing on .DefaultDrawItem.

As the TJvPopupMenu has extended draw-modes with painters calling the "original" paint routine doesn't work at all, you have to create and use a painter yourself.

So I think that the complete method DefaultDrawItem is deprecated and has to be removed.

And as the function is identical to DrawItem users could call DrawItem instead if they - for some reason - really wanted to call it.
Additional Information
Tags No tags attached.
Attached Files zip file icon [^] (1,421 bytes) 2011-06-08 10:56

- Relationships

-  Notes
obones (administrator)
2011-06-07 17:50

Could you create an application that illustrates what you are describing here?
I must admit I have a hard time understanding the infinite loop thing
ralfiii (reporter)
2011-06-08 10:57

Attached there's a project with the RxLib-Popup and the Jedi-Popup.
(you can delete the RxLib-stuff and will still see the Jedi-bug)
obones (administrator)
2012-02-23 10:27

DefaultDrawItem is now deprecated in SVN

- Issue History
Date Modified Username Field Change
2011-03-31 17:40 ralfiii New Issue
2011-06-07 17:50 obones Note Added: 0018617
2011-06-07 17:50 obones Status new => feedback
2011-06-08 10:56 ralfiii File Added:
2011-06-08 10:57 ralfiii Note Added: 0018649
2011-09-21 11:42 obones Status feedback => acknowledged
2012-02-23 10:16 obones Status acknowledged => confirmed
2012-02-23 10:27 obones Note Added: 0019493
2012-02-23 10:27 obones Status confirmed => resolved
2012-02-23 10:27 obones Fixed in Version => Daily / SVN
2012-02-23 10:27 obones Resolution open => fixed
2012-02-23 10:27 obones Assigned To => obones
2012-09-10 14:15 obones Fixed in Version Daily / SVN => 3.46

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker