473,509 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MouseDown selection

I have a list box and would like to point to an item and have a textbox
popup referencing a column in the list box.

On the list box's MouseDown event I have the following

Dim strFullText

strFullText = Me.lstMyList.Column(4)
txtFullText.Visible = True
txtFullText = strFullText

It works but what appears in the text box is the information from the
previous selection. I have to click once and then hold the mouse down to
see the correct information.

I have read that the selection does not take place until after the
MouseDown event.

Is there a workaround for this? Or am I out of luck?

Thank you,
Deborah

Nov 12 '05 #1
3 4374
On Sat, 08 Nov 2003 03:18:38 GMT, "Deborah V. Gardner"
<dg******@twcny.rr.com> wrote:

Forget the code and put this in the ControlSource for the text box:
=[MyListbox].[Column](4)

-Tom.

I have a list box and would like to point to an item and have a textbox
popup referencing a column in the list box.

On the list box's MouseDown event I have the following

Dim strFullText

strFullText = Me.lstMyList.Column(4)
txtFullText.Visible = True
txtFullText = strFullText

It works but what appears in the text box is the information from the
previous selection. I have to click once and then hold the mouse down to
see the correct information.

I have read that the selection does not take place until after the
MouseDown event.

Is there a workaround for this? Or am I out of luck?

Thank you,
Deborah


Nov 12 '05 #2
Tom

Thank you, that streamlined it, but I still have the same problem. I
have to hold the mouse button down twice to get the correct text.

Will I have to forego using MouseDown and use the OnClick event?

Deborah

Tom van Stiphout wrote:
On Sat, 08 Nov 2003 03:18:38 GMT, "Deborah V. Gardner"
<dg******@twcny.rr.com> wrote:

Forget the code and put this in the ControlSource for the text box:
=[MyListbox].[Column](4)

-Tom.
I have a list box and would like to point to an item and have a textbox
popup referencing a column in the list box.

On the list box's MouseDown event I have the following

Dim strFullText

strFullText = Me.lstMyList.Column(4)
txtFullText.Visible = True
txtFullText = strFullText

It works but what appears in the text box is the information from the
previous selection. I have to click once and then hold the mouse down to
see the correct information.

I have read that the selection does not take place until after the
MouseDown event.

Is there a workaround for this? Or am I out of luck?

Thank you,
Deborah



Nov 12 '05 #3
On Sat, 08 Nov 2003 04:42:12 GMT, "Deborah V. Gardner"
<dg******@twcny.rr.com> wrote:

In my solution there is no code in any event. Just this expression in
the ControlSource of the text box. I've used this technique many
times, and have never observed the strange behavior you are
describing.

-Tom.

Tom

Thank you, that streamlined it, but I still have the same problem. I
have to hold the mouse button down twice to get the correct text.

Will I have to forego using MouseDown and use the OnClick event?

Deborah

Tom van Stiphout wrote:
On Sat, 08 Nov 2003 03:18:38 GMT, "Deborah V. Gardner"
<dg******@twcny.rr.com> wrote:

Forget the code and put this in the ControlSource for the text box:
=[MyListbox].[Column](4)

-Tom.
I have a list box and would like to point to an item and have a textbox
popup referencing a column in the list box.

On the list box's MouseDown event I have the following

Dim strFullText

strFullText = Me.lstMyList.Column(4)
txtFullText.Visible = True
txtFullText = strFullText

It works but what appears in the text box is the information from the
previous selection. I have to click once and then hold the mouse down to
see the correct information.

I have read that the selection does not take place until after the
MouseDown event.

Is there a workaround for this? Or am I out of luck?

Thank you,
Deborah



Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
16290
by: JJ | last post by:
Hi All, I need to create a MouseDown event for a picture box . Am I doing the following right? pictureBox.MouseDown += new System.WinForms.MouseEventHandler(pictureBox_MouseDown) Then
0
1084
by: Josh | last post by:
Hi, I am trying to capture the MouseDown event over a 3rd-party control (a streaming video screen). I am trying to draw a rubberbanding rectangle over an area of the streaming screen (which...
1
4231
by: Jürgen Müllder | last post by:
Hi! I have a TreeView in my Application. I have the MouseDown Attached to the TreeView. When i click at a Node it makes that what it should. But when i Expand a Node by clicking at the Plus Sign...
7
8096
by: Scott Mackay | last post by:
Hi, I'm using visual studio dotnet 2002 programming in vb can anyone tell me how I can handle the mousedown event for pictureboxes I create dynamically at runtime? I've tried setting the...
4
4725
by: rsmith | last post by:
How can I capture the MouseDown event on a Label ? I entered thr following code and got a " cannot handle Event 'MouseDown' because they do not have the same signature." Private Sub...
2
3555
by: Rob | last post by:
How can I fix the following warning warning BC40004: sub 'MouseDown' conflicts with event 'MouseDown' in the base class 'Control' and so should be declared 'Shadows'. This warning appears...
1
2775
by: Alan | last post by:
i have a form with a label on it Private Sub Label1_mousedown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown ' do stuff End Sub ...
1
5199
by: JDeats | last post by:
It appears the WinForm MouseDown and MouseUp event handlers are not working properly. In the "bare bones" sample application below, Form1_MouseUp gets called even through the mouse button remains...
2
3007
by: lmefford | last post by:
Is there a way to modify all textboxes on a form so that when you click on any of them you process the SelectAll() function. For exaple, let's say I've created a form with 30 textboxes. These...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.