I have an application that reads a log file into a text area when it opens. I want to set the scroll position to the end of the text so that the most recent log entries are visible when the window opens. The following code in the window open event works in OS X but not in Windows:
TextArea.ScrollPosition = TextArea.LineNumAtCharPos(TextArea.Text.Len)
If I put the code in the window activate event the scroll position is correct in Windows but the text area is blank until the scrollbar is moved by the user as the text doesn't draw until then even though it's read in in the Window open event.
What needs to be done in Windows to get this to work properly?
If I'm not mistaken, looks like you are using: TextArea1.text = Your_Logfile
If this is the case, try following: TextArea1.Appentext YourLogfile
When you use TextArea1.Appentext the scroll position will be in the bottom and you don't need to use your code above