View previous topic :: View next topic |
Author |
Message |
nicesai
Joined: 05 Dec 2006 Posts: 4
|
Posted: Fri Jun 27, 2008 3:27 pm Post subject: Textbox with circular buffer |
|
|
I am wondering if it is possible to use a textbox with circular buffer ? Like after the maximum number of chars are in the textbox, when additional chars are appended, same number of chars at the top should be deleted.
(like a console)
I implemented with a circular buffer I created, but I can only clear all the text in the textbox and add the entire circular buffer data to the textbox. everytime. This is causing the widget to flicker a lot and it is slow.
Is there anyway to replace the internal storage with a circular buffer ?
Regards
Sai |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun Jun 29, 2008 3:09 pm Post subject: Re: Textbox with circular buffer |
|
|
To trim off some leading text, you can set the selection to the text you want removed, then use selectedText = ""
You might want to enable hideSelection so that changing the selection doesn't scroll to that spot; you can restore the selection to where it was, if you wish. |
|
Back to top |
|
|
|