473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TextBox, TAB and OnLeave event

31
I have an annoying issue with a simple textbox control. I'm trying to catch the TAB key with KeyUp (nothing else works), but for some reason as soon as I hit it (before KeyUp!), OnLeave fires and messes things up. Why? What's causing it? In that particular place, no events are fired before so nothing can cause focus change!

M.
Jun 26 '07 #1
3 2106
kenobewan
4,871 Expert 4TB
Sounds like another event is firing?
Jun 26 '07 #2
Mecena
31
Sounds like another event is firing?
yes it does, but not by my code:) my guess is that textbox's native event handles the TAB key before i try to handle it on KeyUp, which would cause this thing to happen. but how to override this behaviour?
Jun 26 '07 #3
Mecena
31
yes it does, but not by my code:) my guess is that textbox's native event handles the TAB key before i try to handle it on KeyUp, which would cause this thing to happen. but how to override this behaviour?
Anyway, it seems that i've found some kind of solution: overriding IsInputKey in inherited control. I simply state:

public override bool IsInputKey(Keys keyData)
{
if(keyData==Keys.Tab)
return true;
else
return base.IsInputKey(keyData);
}

and it works. for now, that is. anyone care to elaborate?

Mecena
Jun 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: ross kerr | last post by:
Hi all, I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area. In the OnLeave event of the combobox, the selected...
3
by: Nic | last post by:
Hey, I have an ASP-application. In the ASPX I have an <asp:dropdownlist ..>. Now when I leave this control I want to initialisize some other fields. In window forms we uses the onleave event but...
6
by: ML | last post by:
Hi NG, Can anyone tell me how to create a OnLeave event on a regular textbox in an ASP.NET webform? The only events I have available are: TextChanged, Disposed, Init, Load, Prerender and...
2
by: Colin McGuire | last post by:
Hi, I have a child form - when the mouse is over the button on the parent form, I show the child form. When the mouse cursor is moved away from the button, I hide the child form. My child form...
8
by: Martin | last post by:
Hi all, I'm trying to make a subclass of the Textbox. One of the things I did there is the following: Protected Overrides Sub OnLeave(ByVal e As System.EventArgs) If Me.DataType = 1 Or...
1
by: Ben Fidge | last post by:
Our customers want to pop-up a small survey when their users have finished browsing their site. To the best of my knowledge, I don't think this is even possible. Can anyone confirm this or,...
3
by: Patrick [MSFT] | last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature of another language (Dexterity used by Microsoft Dynamics) and so while a filling a drop down list is a workable solution...
8
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:
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.