FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to know when the cursor has left a textBox

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Tue Jun 05, 2007 3:41 pm    Post subject: How to know when the cursor has left a textBox Reply with quote

Greetings.

I have a textBox and I would like to know when a cursor has left that textBox, and after that, execute a function. I guess I could do the Keys.TAB, but what if the user uses the mouse?

thanks,

jic
Back to top
View user's profile Send private message
un_guru



Joined: 14 Sep 2005
Posts: 32

PostPosted: Wed Jun 06, 2007 12:21 am    Post subject: Reply with quote

hi,
you can do it like this:
Code:

textBox.mouseLeave ~= &onMouseLeave_textBox;

void onMouseLeave_textBox(Object o, MouseEventArgs mea)
{
  // property of dfl.control: http://wiki.dprogramming.com/DflDoc/Control
}
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Jun 06, 2007 10:04 am    Post subject: Re: How to know when the cursor has left a textBox Reply with quote

I think you want lostFocus
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group