Board index » kylix » How to scroll to a specific location in a TMemo
Jim K
![]() kylix Developer |
Jim K
![]() kylix Developer |
How to scroll to a specific location in a TMemo2005-07-15 07:12:36 AM kylix2 So I know how to do this in Delphi/CBuilder but I can't seem to find a way to do this in Kylix. In Delphi the following code would make a TMemo scroll to a specific location, in this case the 5th line from the top. with Memo1 do begin SelStart := Perform(EM_LINEINDEX, 5, 0); Perform(EM_SCROLLCARET, 0, 0); end; In Kylix TMemo.Perform doesn't exist. Any suggestions on how to do this would be appriciatied. |
theo
![]() kylix Developer |
2005-07-15 06:56:36 PM
Re:How to scroll to a specific location in a TMemo
Jim K schrieb:
QuoteSo I know how to do this in Delphi/CBuilder but I can't seem to find a way to do this in Kylix. ... Cp.Col:=0; Cp.Line:=5; SampleMemo.CaretPos:=Cp; This ensures that the cursor position is visible. Or you might take a TSynEdit (or TSynMemo) for more control. (see Topline property) |
Jim K
![]() kylix Developer |
2005-07-16 12:20:53 AM
Re:How to scroll to a specific location in a TMemo
Changing the CaretPos works but if the file is too large the performance can be pretty bad. I'll look into the TSynMemo and thanks for the tip.
Jim theo < XXXX@XXXXX.COM >wrote: QuoteJim K schrieb: {smallsort} |