At last I've found you... I am programmatically building a memo but the height of the component is less than the actual text. I want to show the last line entered - I have tried selstart etc but it doesn't change the text visible in the memo. Pat Bell Using Virtual Access http://www.soft-shop.com
![]() |
0 |
![]() |
Patrick Bell wrote: > At last I've found you... > > > I am programmatically building a memo but the height of the > component is less than the actual text. I want to show the last > line entered - I have tried selstart etc but it doesn't change > the text visible in the memo. > > Pat Bell > > Using Virtual Access > http://www.soft-shop.com Pat, Try the following: // move the caret to first char on first line Control.Perform(EM_SCROLLCARET, 0, 0); // now scroll forward to desired line Control.Perform(EM_LINESCROLL, 0, LineNbr); John Furlong
![]() |
0 |
![]() |
"Patrick Bell" <pat@patbell.co.uk> wrote in message news:4877@forums.codegear.com... > I have tried selstart etc but it doesn't change the text visible in the > memo. You have to scroll the Memo manually, ie: Memo1.SelStart := Memo1.GetTextLen; Memo1.SelLength := 0; Memo1.Perform(EM_SCROLLCARET, 0, 0); Gambit
![]() |
0 |
![]() |
Thanks that works a treat. In article <4881@forums.codegear.com>, John Furlong wrote: > Patrick Bell wrote: > > At last I've found you... > > > > > > I am programmatically building a memo but the height of the > > component is less than the actual text. I want to show the last > > line entered - I have tried selstart etc but it doesn't change > > the text visible in the memo. > > > > Pat Bell > > > > Using Virtual Access > > http://www.soft-shop.com > > Pat, > > Try the following: > > // move the caret to first char on first line > Control.Perform(EM_SCROLLCARET, 0, 0); > // now scroll forward to desired line > Control.Perform(EM_LINESCROLL, 0, LineNbr); > > John Furlong > Pat Bell Using Virtual Access http://www.soft-shop.com
![]() |
0 |
![]() |
Thanks, I don't know what I'd do without this ng :-) In article <4989@forums.codegear.com>, Remy Lebeau (TeamB) wrote: > "Patrick Bell" <pat@patbell.co.uk> wrote in message > news:4877@forums.codegear.com... > > > I have tried selstart etc but it doesn't change the text visible in the > > memo. > > You have to scroll the Memo manually, ie: > > Memo1.SelStart := Memo1.GetTextLen; > Memo1.SelLength := 0; > Memo1.Perform(EM_SCROLLCARET, 0, 0); > > Gambit > Pat Bell Using Virtual Access http://www.soft-shop.com
![]() |
0 |
![]() |