mousedown synchronizing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking for a concise way to have a ListBox MouseDown event trigger a
pop-up form containing only the current ListBox's Column(4) data. Kind of
like of a zoom box, but controlled solely by the length of time the mouse
button is held down. The pop-up closes immediately upon the ListBox's
MouseUp event. I have this working with the exception of the data in the
pop-up displaying the immediately previous event's data. In other words, it
requires mousedown + mouseup + mousedown again to bring the pop-up field up
to date. I've tried various event locations on both the ListBox and the
pop-up to create the right timing but end up with the same result. The
pop-up form name is frmDescriptBalloon. The ListBox name is lstAction.
Currently, the pop-up's [Descript] field populates with lstAction.Column(4)
data upon the pop-up's LoadEvent.

Thank you for your time.
 
Gwhit said:
I'm looking for a concise way to have a ListBox MouseDown event
trigger a pop-up form containing only the current ListBox's Column(4)
data. Kind of like of a zoom box, but controlled solely by the
length of time the mouse button is held down. The pop-up closes
immediately upon the ListBox's MouseUp event. I have this working
with the exception of the data in the pop-up displaying the
immediately previous event's data. In other words, it requires
mousedown + mouseup + mousedown again to bring the pop-up field up to
date. I've tried various event locations on both the ListBox and the
pop-up to create the right timing but end up with the same result.
The pop-up form name is frmDescriptBalloon. The ListBox name is
lstAction. Currently, the pop-up's [Descript] field populates with
lstAction.Column(4) data upon the pop-up's LoadEvent.

Thank you for your time.

Why are you using MouseDown, and not the AfterUpdate event? Is this a
multiselect list box, or a normal single-select box? In the MouseDown
event, I wouldn't expect the list box's value to have been updated yet.
 
A fine point you make. (Sorry..I sounded like Yoda..Come to think of it, I
look a bit like him too.)

The only reason I wanted the mousedown option, if possible, is for the user
to have control over how long the pop-up remains visible, as they peruse the
listbox. It is not set to MultiSelect or Simple. It's defaulted to None.
Thus far, I am able to make the data sync up when I have the pop-up form open
up in the Before Update Event. It gives the user the appearance that it is
remaining open, yet the data changes properly during listbox selection.

Dirk Goldgar said:
Gwhit said:
I'm looking for a concise way to have a ListBox MouseDown event
trigger a pop-up form containing only the current ListBox's Column(4)
data. Kind of like of a zoom box, but controlled solely by the
length of time the mouse button is held down. The pop-up closes
immediately upon the ListBox's MouseUp event. I have this working
with the exception of the data in the pop-up displaying the
immediately previous event's data. In other words, it requires
mousedown + mouseup + mousedown again to bring the pop-up field up to
date. I've tried various event locations on both the ListBox and the
pop-up to create the right timing but end up with the same result.
The pop-up form name is frmDescriptBalloon. The ListBox name is
lstAction. Currently, the pop-up's [Descript] field populates with
lstAction.Column(4) data upon the pop-up's LoadEvent.

Thank you for your time.

Why are you using MouseDown, and not the AfterUpdate event? Is this a
multiselect list box, or a normal single-select box? In the MouseDown
event, I wouldn't expect the list box's value to have been updated yet.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Gwhit said:
A fine point you make. (Sorry..I sounded like Yoda..Come to think of
it, I look a bit like him too.)

The only reason I wanted the mousedown option, if possible, is for
the user to have control over how long the pop-up remains visible, as
they peruse the listbox. It is not set to MultiSelect or Simple.
It's defaulted to None. Thus far, I am able to make the data sync up
when I have the pop-up form open up in the Before Update Event. It
gives the user the appearance that it is remaining open, yet the data
changes properly during listbox selection.

Yes, in the BeforeUpdate event the value of the list box will have been
changed. You can cancel that event to stop the changed value from being
committed and keep the focus in the control, but aside from that there's
not much difference between BeforeUpdate and AfterUpdate.

If you want to do something that requires you to know which row of the
list box the mouse is over *before* (or without) updating the list box
value, you may find something on Stephen Lebans' web site to that
purpose: www.lebans.com . Stephen is the wizard of UI techniques.
He's done some very fancy things with custom tooltips, so you may want
to have a look at his tooltip sample project.
 
Back
Top