FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Textbox with circular buffer

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
nicesai



Joined: 05 Dec 2006
Posts: 4

PostPosted: Fri Jun 27, 2008 3:27 pm    Post subject: Textbox with circular buffer Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Jun 29, 2008 3:09 pm    Post subject: Re: Textbox with circular buffer Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group