Board index » cppbuilder » Same property-values of a TMemo, but different behaviour. Why is this the case and how to avoid ths?
MR
![]() CBuilder Developer |
Same property-values of a TMemo, but different behaviour. Why is this the case and how to avoid ths?2007-01-12 09:15:18 PM cppbuilder112 I'm having a TMemo-component. At start it is empty. When I enter e,g. 1<RETURN>2 and try to use the cursor to go down into the third line this is not poosible. When inspecting the Lines-property Count is (as expected) 2, Strings[0] cotains "1", Strings[2] contains "2". All as expected. Than (e.g. by a click on a button) executing the following code: Memo->Lines->Clear(); Memo->Lines->Append("1"); Memo->Lines->Append("2"); results in the same property-values of Lines: Again Strings[0] cotains "1", Strings[2] contains "2". All as expected. But to my surprise when entering the memo, just by miving the cursor I am able to scroll down to the third line. Setting the cursor behind the 2 and pressing DEL some times results in the behaviour of the first case. Where is the difference between the two cases and how do I have to change my code for case 2 to get the behaviour of case 1. Thanks, Michael |