View Issue Details

IDProjectCategoryView StatusLast Update
0005539JEDI VCL00 JVCL Componentspublic2012-09-10 14:15
ReporterralfiiiAssigned Toobones 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.46 
Summary0005539: TJvPopupMenu.DefaultDrawItem deprecated
DescriptionThe 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.
TagsNo tags attached.

Activities

obones

2011-06-07 17:50

administrator   ~0018617

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

2011-06-08 10:56

 

bug.zip (1,421 bytes)

ralfiii

2011-06-08 10:57

reporter   ~0018649

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

2012-02-23 10:27

administrator   ~0019493

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: bug.zip
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