Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting Text in Grid-Textbox
Message
From
24/10/2000 10:23:59
 
 
To
24/10/2000 02:34:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00432839
Message ID:
00433474
Views:
23
Hi!

>I've tried several properties. But Refresh has not been part of that. I'll give it a try/search.
>
>> 1. Where you put code to set SelStart and SelLength properties of textbox?
>
>grid.column.container.textbox.gotfocus
>grid.column.container.textbox.click

When you want to select text by mouse click, put code to setup SelStart and SelLength in MouseUp event, not in click.

>> 2. Are you sure other methods do not reset focus to control? For example, refresh of container.
>
>No, I'm not sure anymore :-)

Use Coverage profiler, or run program in trace mode and setup breakpoint to stop programe each time when SelStart and SelLength of the textbox changed. It may cause a lot of weird stops, if you will not use name like _application.Activeform.MyForm.MyGrid... ;)

>> 3. How you want to get textbox selected? When you tab to it by 'Tab' key, should work ok just using SelectOnEntry property of textbox. When you want to select it just when mouse clicked, this requires some tricks because VFP events.
>
>'Tab' is fine, 'Click' just nice to have.

I also have weird idea, but I'm not sure it might help, just try it. In the GotFocus event of container try to use setfocus method of textbox inside and setup its SelStart/SelLenth.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform