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.comICQ #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.