No! No! No! No! No!!!
(That's what my mother used to say to me with a wagging finger when I
didn't pay attention to her.)
You missed the correct event. NOT the Mouse Down event BUT the
CellClick event of the listbox.
Everything inside the ListBox is a cell of one form or another. This
includes Hierarchal ListBoxes as well. The Scrollbar is part of the
ListBox and not affected by the CellClick event but is affected by
the MouseDown event. These are both both Boolean functions that can
be diverted by returning true in the event.
Tim gave you the answer first although he showed it as a Sub which is
incorrect.
Sub Listbox.CellClick
Return True
End Sub
Forget about the MouseDown event unless you wish to define an area
within the ListBox itself as Charles suggested.
Terry
On Jul 13, 2006, at 9:20 AM, Craig Hoyt wrote:
Terry, your experience may be different but putting a < return true
> in the mouse down event disabled the scrollbar from moving. The
only way I could get it to work was my method of testing where the
click happened and return true if it was inside the listbox and do
nothing if it was in the scrollbar. Maybe I misunderstood everybody
and I not doing it correct or how others explained but this does
seem to work just fine.
Message: 12
Subject: Re: Disabling Clicks In Listbox
From: Terry Ford <[EMAIL PROTECTED]>
Date: Wed, 12 Jul 2006 16:24:13 -0700
On Jul 12, 2006, at 3:57 PM, Craig Hoyt wrote:
Thanks Tim, Charles, and Christian... When I tried this last night
it seems I was coding with one open. It never dawned on me to use
the x and y values to do the filtering in the areas I want and not
in the other. As it turns out I don't want clicks in the listbox at
all just the scrollbar. So I use < if x<Listbox.width-15 then
return true > I shield the listbox from clicks no matter what size
the listbox is.
Or perhaps simply Return True in the CellClick event. You can still
scroll the list.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>