Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » DocEdit code scrolling
DocEdit code scrolling [message #36891] Wed, 18 July 2012 00:07
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
I'd like to write code to add contents to the end of a DocEdit ctrl, while making it scroll down to always show the end of the line just appended.

After browsing the TextEdit.h/DocEdit.cpp code, I came up with the following solution:
class MyDocEdit: public DocEdit {

        ...
    void AppendText(String txt) {
	Insert(GetLength(), txt);
	PlaceCaret(GetLength());
    }
};



Is there a more appropriate way to do it without having to inherit from DocEdit for getting access to its PlaceCaret (protected) method?

I also want to keep the scroll bar always hidden, regardless of the line count in the ctrl. For this I included
 RemoveFrame(1);
in the constructor, which actually removes the scrollbar. Is it ok?

tks.

[Updated on: Thu, 19 July 2012 14:44]

Report message to a moderator

 
Read Message
Previous Topic: EditTime - how to change format?- [SOLVED]-EditField & Convert
Next Topic: BUG?: EditString Text rendering not stable with some Strings
Goto Forum:
  


Current Time: Fri Mar 29 12:35:00 CET 2024

Total time taken to generate the page: 0.01260 seconds