Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
2917 00 JVCL Components minor always 2005-04-27 12:54 2005-05-12 12:42
anonymous  
outchy  
normal  
resolved 3.00  
fixed  
none    
none 3.10  
0002917: TJvXPBar highlights wrong items
When the mouse is hovering over the top half of an item in TJvXPBar, the previous item is highlighted.

The fix is in TJvXPBar.HookMouseMove. Note that I have HeaderHeight := 16, ItemHeight := 14, TopSpace := 0. When I counted actual pixels above the first item, I counted 23, whereas the value calculated was 30.

I'm not sure if this is the best solution, but it works in my case. Somebody please verify my calculations.

Change this:

  Header := FC_HEADER_MARGIN + HeaderHeight + FC_ITEM_MARGIN;

to:

  Header := FC_HEADER_MARGIN div 2 + HeaderHeight + FC_ITEM_MARGIN div 2 + FTopSpace;

and change this:

  NewIndex := (Y - Header) div ((Height - Header + 4 - FTopSpace) div FVisibleItems.Count);

to:

  NewIndex := (Y - Header) div ItemHeight;

Issue History
2005-04-27 12:54 anonymous New Issue
2005-05-12 12:13 outchy Status new => confirmed
2005-05-12 12:26 outchy Note Added: 0007146
2005-05-12 12:38 outchy Note Deleted: 0007146
2005-05-12 12:39 outchy Note Added: 0007147
2005-05-12 12:42 outchy Status confirmed => resolved
2005-05-12 12:42 outchy Resolution open => fixed
2005-05-12 12:42 outchy Assigned To => outchy

Notes
(0007147)
outchy   
2005-05-12 12:39   
There are other bugs when calculating the header rect and the roll button rect.
I think they are fixed with the modification I made.