View Full Version : Scrollabe Btext?
07-28-2008, 03:08 PM
I have a BText object that contains text that overfills the dimensions of the object. Is there a property in Bananas that I'm missing that places the pageup/pagedown highlights and vertically scrolls the text when pageup/pagedown keypresses are received?
07-28-2008, 04:50 PM
There is no built in way to do this with BText.
You pretty much have to roll your own.
One of the easiest ways to do this is to use a BList, basically you call View.layoutText() to split the text into lines based on the width of the view, then shove each line into a BList row.
the other way is to still use a BText but handle the scrolling and highlights yourself.
07-28-2008, 04:57 PM
That's what I was afraid of. Thanks for the help.
07-28-2008, 05:11 PM
Here's an old thread where F8ster posted some code
08-02-2008, 02:29 AM
In bananas plus I made a BScrollPanePlus which does exactly this. It only does the overfill up/down though, not left/right. You can assemble any set of views inside it as child views and it scrolls them all.
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.