View Issue Details

IDProjectCategoryView StatusLast Update
0006717JEDI VCL00 JVCL Componentspublic2021-04-23 18:30
ReporterPiedSoftwareAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version3.48 
Target VersionFixed in Version 
Summary0006717: Colour drop down menus not showing colour in my code
DescriptionThe version is 3.5.

The problem is explained here, with sample code and images to demonstrate the problem:
https://en.delphipraxis.net/topic/4761-has-anyone-been-able-to-get-the-color-tjvspeeditem-to-work-correctly-on-tframe/
Steps To ReproduceDownload the code in the delphipraxis page I gave in the Description. Try dropping down the color menus in both the main form and the form of the sample code.
TagsNo tags attached.

Activities

AHUser

2021-04-20 19:46

developer   ~0021962

You set the ColorMenu.Style to msOwnerDraw but then you don't implement the OnDrawItem and OnMeasureItem. So your menu items have a width of 0px and a height of 16px. And nothing is painted anyway because OnDrawItem is not assign. The "example form" creates its own style painter TJvXPColorMenuItemPainter and assigns it to ColorMenu.ItemPainter.

 

So this is not a bug but a handling error.


 

procedure TEditorMainForm.FormCreate(Sender: TObject);
...
begin
  ...
  ColorMenu.ItemPainter := TJvXPColorMenuItemPainter.Create(Self);
  BackgroundMenu.ItemPainter := TJvXPColorMenuItemPainter.Create(Self);

Issue History

Date Modified Username Field Change
2021-04-07 10:43 PiedSoftware New Issue
2021-04-20 19:46 AHUser Assigned To => AHUser
2021-04-20 19:46 AHUser Status new => feedback
2021-04-20 19:46 AHUser Note Added: 0021962
2021-04-23 18:30 AHUser Status feedback => closed
2021-04-23 18:30 AHUser Resolution open => fixed