473,795 Members | 3,063 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.Co lumn(4)
txtFullText.Vis ible = 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 4397
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.Co lumn(4)
txtFullText.Vis ible = 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.Co lumn(4)
txtFullText.Vis ible = 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.Co lumn(4)
txtFullText.Vis ible = 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
16321
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
1095
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 is refreshing slowly). When I drag and stretch a rectangle starting on the form, I can pass it over the streaming screen. However, I cannot start a
1
4243
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 the MouseDown gets fired and it runs the routine, what i don't want. Is there a way to find out if the expand sign was clicked? My Idea was to get a bool and a TreeNode in the class where i fetch the
7
8122
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 mousedown to handle mybase.mousedown but it doesn't detect the mousedown event until I move out of the pictureboxes I have created (only works on the part of the form where I don't have any pictureboxes). I also cannot set the mousedown event to...
4
4743
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 Label1_MouseDown _ (ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Label1.MouseDown
2
3564
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 because I entered the following Sub Private Sub MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles AxWebBrowser1.MouseDown
1
2793
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 Private Sub Label1_mouseup(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseUp
1
5219
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 pressed while dragging the Form window to resize it. Can this "problem" be explained as some sort of by-design behavior? If so what is the work around to detecting when a user has completed resizing a Windows Form by way of mouse drag? / ...
2
3019
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 textboxes when clicked on, will select all of the text inside of them using the textbox.selectall(). I'm hoping to do this without creating 30 different Subs. How do I do it?
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10436
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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 we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.