[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Re: TextBox Click Event NOT Firing

Andrew Enfield \(MS\)

8/5/2004 11:13:00 PM

Try asking this on microsoft.public.dotnet.framework.compactframework. This
newsgroup is for ASP.NET mobile controls.

With that said, here's a possible solution: I'm not sure that the Click
event for textboxes is valid in the .NET CF, regardless of what Intellisense
says. There are plenty of events in the .NET CF that are, as I think I've
heard it put before, 'inherited but not implemented.' The Paul Yao and David
Durant book '.NET Compact Framework Programming with C#' (or VB) has a good
discussion of how and why this works the way it does.

--
Andrew Enfield
Programmer Writer, Windows CE

This posting is provided AS IS with no warranties, and confers no rights.

"George Papadopoulos via .NET 247" <anonymous@dotnet247.com> wrote in
message news:u7KYX%23heEHA.708@TK2MSFTNGP09.phx.gbl...
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.dotn...)

<Id>YSTK1QxRX0e7QQuvKoBXfw==</Id>