Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Container causes refresh problem
Message
From
28/09/1997 01:12:37
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00052009
Message ID:
00052024
Views:
30
>In your form you have a treeview.
>(UT browser i suppose...)
>In this treeview, the user select one message and click on it.
>(like i do in the upper section of UT)
>When this appen, you need to display the selected message in an editbox (this editbox is named 'message').
>The cursor is not always at the rigth place when this occur.

You're ok so far. We can also add that the name of the container is also Message. :) So, from an external point of view it may look like this: ThisForm.Message.Message.Refresh().

>For that reason you need to put some code in the treeview click.
>Nooo...

The code is in the NodeClick(). I have the following:

LPARAMETERS node
Node.Selected=.T.
This.Parent.ShowInfo(Node.Key,Node.Index)

Then, the ShowInfo() method is dealing with various thing. The last 2 lines are:

*This.Message.SelStart=1
This.Message.Refresh()

As you see, I put a comment to avoid the bug.

>This behaviour occurs only when the edit box was previuosly accessed and the cursor was let to the end of the editbox.

Yes.

>In this case you just have to put the code in the right place, on the source of the problem.

>This.SelStart=0 && not 1!
>in the Message.LostFocus()

It's the same thing. The problem is as soon as we do a call to SelStart, the bug is stucked in memory.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform