Lazarus
Programming => Widgetset => Carbon => Topic started by: ProgEd on July 04, 2013, 03:21:35 pm
-
There is a behavior difference between the Windows and OS X implementation of TMemo that's driving me crazy. I'm using Lazarus 1.0.10 on both Windows (Win 7) and Max (OS X 10.8 ). I load a TMemo field with lots of text. In Windows it stays at the top (where I want it). However, on the Mac it stays at the bottom forcing the user to scroll to the top manually.
I'm not a Mac programmer so I'm not sure how to address this. What I want is for the TMemo field to be positioned at the top as it is in Windows.
Is there a way to accomplish this?
Thanks,
Ed
-
Probably setting SelStart to zero at the beggining of your program (if the memo already has text). If the user loads it from a file, do the same after that.
-
Yup, tried that, didn't work.
Thanks for the suggestion!
Ed
-
Yup, tried that, didn't work.
Thanks for the suggestion!
Ed
You could try to set SelStart to 0 also in OnActivate and OnShow events.
-
Okay, it appears the problem was caused by loading the TMemo field in the OnCreate event. By waiting until the OnShow event everything seems to work fine!
One small update -- after the SelStart := 0 you have to do a SetFocus on the control.
Thank you both for your suggestions!
Ed