Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Behavior of Textboxes in Winforms
Message
From
02/10/2002 17:07:46
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Behavior of Textboxes in Winforms
Miscellaneous
Thread ID:
00707103
Message ID:
00707103
Views:
84
I'm trying to do something in a .NET textbox that I was able to do in VFP, and I seem to be missing something.

Basically I want a textbox to be in 'overstrike' (selected mode) when I first get into it. However, if I click a 2nd time on any specific position in the textbox, I'm in 'non-overstrike' mode.

Basically, in VFP, I created a textbox class, and added a custom property called 'lClickSelect'.

In the GOTFOCUS event, I'd do the following

nStartSeconds = SECONDS()

In the CLICK event, I'd have this...

IF This.lClickSelect
This.SelStart = 0
This.SelStart = 99
This.lClickSelect = .f.
ENDIF

And finally, in the MOUSEDOWN event, I'd have this...

IF SECONDS() - nStartSeconds < .2
This.lClickSelect = .t.
ENDIF

(Implication is that no more than two tenths of a second would elapse between clicking and typing).

So I had the 'best of both worlds'...when the user clicked or tabbed into a field, the app was in 'overstrike' mode, but when the user clicked a 2nd time to a particular section of the textbox, the app was not in overstrike mode. I know this sounds a little goofy, but our users screamed at us that they wanted it this way.

Problem is, I don't see a property to set a textbox in 'overstrike' mode (like SELECTED, etc.) Any thoughts?

Thanks,
Kevin
Next
Reply
Map
View

Click here to load this message in the networking platform