View Issue Details

IDProjectCategoryView StatusLast Update
0001647JEDI VCL04 Feature Requestpublic2004-04-28 09:28
ReporterMarkus SpoettlAssigned Tomarcelb 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001647: JvInspectorColorItem: List height fix proposal/question
DescriptionI finally fixed the item list painting issue (list not being a multiple of item height) in ColorItem, it requires a change in TJvCustomInspectorItem.DropDown as follows:

    if TListBox(ListBox).IntegralHeight then
    begin
      ListBox.Canvas.Font := TListBox(ListBox).Font;
// change begin (declare _h: Integer; somewhere)
      _h := CanvasMaxTextHeight(ListBox.Canvas);
      DoMeasureListItem(ListBox, -1, _h);
      TListBox(ListBox).ItemHeight := _h;
// change end
    end;

The problem is that

// oldcode begin
    TListBox(ListBox).ItemHeight := CanvasMaxTextHeight(ListBox.Canvas);
// oldcode end

will return a value that is too small for color items.

Additionally, you need to remove iifOwnerDrawListVariable in TJvInspectorColorItem.SetFlags()

like:

    inherited SetFlags(Value + [iifValueList,
                                iifAllowNonListValues,
                                iifOwnerDrawListFixed]
                             - [iifOwnerDrawListVariable]);


I'm aware of the fact that calling DoMeasureListItem(x, -1, _h) might be a problem, but I don't know a better way to do it.
TagsNo tags attached.

Activities

marcelb

2004-04-28 09:14

manager   ~0004115

Fixed TJvCustomInspectorItem.DropDown in CVS rev 1.87

marcelb

2004-04-28 09:28

manager   ~0004116

Fixed in JvInspExtraEditors 1.15 (including the problem with the not rendering color names in a drop down).

Issue History

Date Modified Username Field Change
2004-04-15 12:11 Markus Spoettl New Issue
2004-04-15 12:37 marcelb Assigned To => marcelb
2004-04-15 12:37 marcelb Status new => acknowledged
2004-04-15 12:37 marcelb Category 00 JVCL Components => 04 Feature Request
2004-04-28 09:14 marcelb Note Added: 0004115
2004-04-28 09:28 marcelb Status acknowledged => resolved
2004-04-28 09:28 marcelb Resolution open => fixed
2004-04-28 09:28 marcelb Note Added: 0004116