473,698 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

textbox.leave and debugging wierdness

I'm having some trouble with my code, and I'm finding stepping through my
code is acting wierd.

I have a form with a listbox and a bunch of text boxes on it.
I populate the listbox with a dataset, then populate all the textboxes by
using a datarowview, based on what is selected in my listbox.
I have code for one of my textboxes, set to handle textbox.leave (to
validate correct input).

Here is where it gets weird.
Before I repopulate my listbox, I clear the dataset that it is based on.
When I step through my code, I find that when this dataset.clear line code
of code is called, it triggers my textbox.leave handle.

Why is this? And why is it that when I'm stepping through my code, it
doesn't step through the textbox.leave code unless I put a breakpoint on it?
(It took me a while to discover that this is what was actually happening)?

TIA!
Amber
May 12 '06 #1
0 821

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

Similar topics

1
3260
by: Chris Mayers | last post by:
Hi, I have an application that has (for the sake of argument) 2 (MDI) windows open. If I click into a textbox on FormA then the 'Enter' event for that TextBox fires, great! However, if I then click on FormB, then back to FormA although the cursor is still flashing in the same textbox on FormA, when I tab out, the 'Leave' event for that TextBox does not fire. If I stay on FormA and Shift-Tab back into the textbox then the 'Enter' event...
2
6144
by: JayDee | last post by:
After a user enters data into a field, I need to populate other controls on the form, based on the user entry. I have to use either Leave, Validating or Validated, and I take it I can't use LostFocus because there is no selection for that event in the dropdown list on the code page. What's happening is that all 3 events mentioned above for the textbox control fire in the proper order when the form is invoked, but don't fire the first time...
13
4319
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying structure of the datasets, i.e lots of child tables etc, I cannot use bindingcontext
6
1210
by: Chrysan | last post by:
I have few textboxes in a page(.aspx), and some of the textboxes with white color BackColor, blue color Border Line (like xp-style control), but some of the textboxes with yellow color BackColor, without blue color Border Line (like traditional 3D textbox style). Why this happen? Please help......thanks.
1
2896
by: Zyrthofar | last post by:
Hi I have three textboxes indicating the individual RGB values of a color. When the user leaves a textbox (Leave event), I check the validity of that number and saves the three values to a set of raw data... The sub used handles the three textboxes's Leave events, and uses the 'sender' variable... Now I have a picturebox with GDI+ circles in it, representing the 8 different colors in the palette. You can choose the color number by...
6
2411
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a dataset. The form also contains a datagrid also bound to the same dataset. I have a button on the form to update the data to the source.
1
2048
by: melanieab | last post by:
Hi again, I have a textbox where the text is longer than the textbox width. When I type something in there or even do any single keystroke (other than tab, up, down, or enter) and then leave, the beginning of the string shows, and focus goes on to the next box. But if I just tab through or want to go straight to the next textbox, the beginning of the string is cut off, leaving the end of the string visible. More info that may/may not be...
8
5086
by: Filipe Marcelino | last post by:
Hi, I'm trying to create a textbox inheriting from the standard textbox. I would like to: 1. repaint the textbox border; 2. define a color for that border; Till now I made this:
7
1593
by: Localbar | last post by:
Hi all, In my form have more then 10 textbox. I would like to make all textbox when lostfocus backcolor is white, when gotfocus backcolor is yellow. But I don't want to write same code in the form. How to solve this problem. Is it can make a textbox class to control or some other method? Thanks
0
8685
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
9171
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
9032
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
6532
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
4373
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
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
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
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.