Board index » cppbuilder » Prevent TListbox from automatically scrolling.

Prevent TListbox from automatically scrolling.


2004-12-19 04:36:42 AM
cppbuilder31
I'm using a TListbox with owner drawn images and 3 columns. There's a
problem with the listbox automatically scrolling and setting the ItemIndex
to the wrong image if the 3rd column is clicked with the mouse.
First I'd like to prevent the auto-scroll from happening when the 3rd
column is clicked. If that's not possible, I need to at least stop the
listbox from setting the ItemIndex incorrectly.
Any ideas?
 
 

Re:Prevent TListbox from automatically scrolling.

I fixed this by trapping WM_LBUTTONDOWN messages and manually setting the
ItemIndex property using ItemAsPos and mouse coordinates.
On Sat, 18 Dec 2004 15:36:42 -0500, KR wrote:
Quote
I'm using a TListbox with owner drawn images and 3 columns. There's a
problem with the listbox automatically scrolling and setting the ItemIndex
to the wrong image if the 3rd column is clicked with the mouse.

First I'd like to prevent the auto-scroll from happening when the 3rd
column is clicked. If that's not possible, I need to at least stop the
listbox from setting the ItemIndex incorrectly.

Any ideas?