smarthaert / phoenixlib

Automatically exported from code.google.com/p/phoenixlib
0 stars 0 forks source link

TPHXListBox #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I click outside a valid item, I think it should keep the current item 
selected instead of chaging itemindex to -1.

I suggest to change procedure TPHXListBox.mouseSelect(const Position: Integer); 

  if (Index < 0) or (Index >= Items.Count) then
    Index := -1;

to

  if (Index < 0) or (Index >= Items.Count) then
    Index := FItemIndex;

Original issue reported on code.google.com by wagenhei...@gmail.com on 24 Feb 2011 at 12:39

GoogleCodeExporter commented 9 years ago
MouseSelect it is ignoring the Margins... please change to 

Index := FTopIndex + (Trunc(Position - ClientRect.Top - Margins.Top) div 
ItemHeight);

Original comment by wagenhei...@gmail.com on 24 Feb 2011 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 8 Aug 2013 at 2:11