TextBox Click Event NOT Firing

From: George Papadopoulos via .NET 247 (anonymous_at_dotnet247.com)
Date: 08/04/04


Date: Wed, 04 Aug 2004 05:35:55 -0700

I'm doing Embedded Development using Visual C#, VS.NET 2003 & PPC 2003 SE Emulator. I have a TextBox Control and I want to change the BackColor of it when someone clicks on it. Apparently Windows Forms Designer doesn't have the Click Event on the list of events available on the Windows Forms Designer but you can generate it from within the Code Editor. The Code Editor gives you the "Click" property when you type "." after the TextBox's name and then, after you type "+=" it detects that you want to generate an event handler displays a tooltip suggesting the rest of the line as in "new EventHandler(textBoxSearch_Click); (Press TAB to insert)". When you do press TAB it generates the new "EventHandler..." line and highlights "textBoxSearch_Click" and gives you another "(Press TAB to insert)" tooltip which will generate the "textBoxSearch_Click" handler in the current Form class. I put my code in the handler but nothing happens when I click on it. I ran it through the debugger putting a breakpoint inside the handler and nothing at all!! The program behaves as if there is no click event handler on the TextBox. Note that all the other event handlers for my other controls on the form work fine. But those other event handlers where generated through the Windows Forms Designer. Any suggestions?? Ideas??

TIA
--------------------------------
From: George Papadopoulos

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>YSTK1QxRX0e7QQuvKoBXfw==</Id>


Loading