Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rick C. Hodgin
  Where is Rick C. Hodgin?
 Indianapolis
 Indiana - United States
 Rick C. Hodgin
 To: Rakesh Kumar
  Where is Rakesh Kumar?
 Sunam
 India
 Rakesh Kumar
 Tags
Subject: RE: Highlight Text Box
Thread ID: 365354 Message ID: 365364 # Views: 57 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Tuesday, December 25, 2012 11:59:45 AM         
   


> Hello Experts and Merry christmas to all
> I want to know ,when my cursor in textbox then textbox highlight or change color automtically, when fillup some data in this textbox then default show.
> how can i do this ?
> thanx in advance.
>
> Be Possitive



Create a subclass of textbox. Add a new property called ovalue (for original value). On the init and/or ProgrammaticChange events, update ovalue to value (this.ovalue = this.value).

Upon GotFocus and LostFocus, based on whether or not the user has changed the value, alter the backcolor. You can use a custom method for this (this.mth_colorize).

I have used rgb(255,255,128) to visually indicate the data has been changed. I can also intercept ctrl+r for a "reset to original value" command.

Best regards,
Rick C. Hodgin

ENTIRE THREAD

Highlight Text Box Posted by Rakesh Kumar @ 12/25/2012 8:27:31 AM
RE: Highlight Text Box Posted by anand kulkarni @ 12/25/2012 8:31:25 AM
RE: Highlight Text Box Posted by Rakesh Kumar @ 12/25/2012 10:09:52 AM
RE: Highlight Text Box Posted by Jun Tangunan @ 12/25/2012 10:34:08 AM
RE: Highlight Text Box Posted by anand kulkarni @ 12/25/2012 12:21:35 PM
RE: Highlight Text Box Posted by Rakesh Kumar @ 12/25/2012 6:06:30 PM
RE: Highlight Text Box Posted by Rick Hodgin @ 12/25/2012 11:59:45 AM