Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » StyledText + Scrollbar issues
StyledText + Scrollbar issues [message #436962] Wed, 26 May 2004 21:47 Go to next message
Ken is currently offline KenFriend
Messages: 8
Registered: July 2009
Junior Member
Hello,

I've got a StyledText with a vertical scrollbar that I will be using to
log colorized text to. I'm looking for advice on two things..

First, when I append text to the StyledText widget, I need the scrollbar
to track the text added and move down accordingly. Basically, if it was at
the bottom before it'll stay at the bottom. And if it was at line 500 of
1000 when 2 lines were added, it'll move to 502.

Second, I need to keep the log to a fixed number of lines and trim from
the beginning when necessary. Is there a preferred/recommended/built-in
way to do this?

Thanks in advance!

-Ken
Re: StyledText + Scrollbar issues [message #436964 is a reply to message #436962] Thu, 27 May 2004 00:42 Go to previous messageGo to next message
Ken is currently offline KenFriend
Messages: 8
Registered: July 2009
Junior Member
After messing with Swing for as long as I did, some of this has been a
heck of a lot easier than I thought it would be.

Maybe not as eloquent as it can be, I've got a working solution to both
problems that seems to run relatively fast and without too much trouble.

So far I've been finding eclipse a LOT more intuitive and simple than
Swing.

One more question though.. Is there an upper limit on how many characters
a StyledText can contain?

-Ken


Ken wrote:

> Hello,

> I've got a StyledText with a vertical scrollbar that I will be using to
> log colorized text to. I'm looking for advice on two things..

> First, when I append text to the StyledText widget, I need the scrollbar
> to track the text added and move down accordingly. Basically, if it was at
> the bottom before it'll stay at the bottom. And if it was at line 500 of
> 1000 when 2 lines were added, it'll move to 502.

> Second, I need to keep the log to a fixed number of lines and trim from
> the beginning when necessary. Is there a preferred/recommended/built-in
> way to do this?

> Thanks in advance!

> -Ken
Re: StyledText + Scrollbar issues [message #437078 is a reply to message #436964] Fri, 28 May 2004 13:46 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
No limit.

"Ken" <khirmint@netscape.net> wrote in message
news:c93di7$t54$1@eclipse.org...
> After messing with Swing for as long as I did, some of this has been a
> heck of a lot easier than I thought it would be.
>
> Maybe not as eloquent as it can be, I've got a working solution to both
> problems that seems to run relatively fast and without too much trouble.
>
> So far I've been finding eclipse a LOT more intuitive and simple than
> Swing.
>
> One more question though.. Is there an upper limit on how many characters
> a StyledText can contain?
>
> -Ken
>
>
> Ken wrote:
>
> > Hello,
>
> > I've got a StyledText with a vertical scrollbar that I will be using to
> > log colorized text to. I'm looking for advice on two things..
>
> > First, when I append text to the StyledText widget, I need the scrollbar
> > to track the text added and move down accordingly. Basically, if it was
at
> > the bottom before it'll stay at the bottom. And if it was at line 500 of
> > 1000 when 2 lines were added, it'll move to 502.
>
> > Second, I need to keep the log to a fixed number of lines and trim from
> > the beginning when necessary. Is there a preferred/recommended/built-in
> > way to do this?
>
> > Thanks in advance!
>
> > -Ken
>
>
Re: StyledText + Scrollbar issues [message #437490 is a reply to message #436964] Fri, 04 June 2004 21:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alfred.fungSPAM.businessobjects.com

Hello,

Can you offer some more insight in how to move the scrollbar?

In my application I search for text in a StyledText, then I select and
move the caret using showSelection(). The problem is the scrollbar
doesn't update to reflect this new position.

- Alfred

Ken wrote:
> After messing with Swing for as long as I did, some of this has been a
> heck of a lot easier than I thought it would be.
>
> Maybe not as eloquent as it can be, I've got a working solution to both
> problems that seems to run relatively fast and without too much trouble.
>
> So far I've been finding eclipse a LOT more intuitive and simple than
> Swing.
>
> One more question though.. Is there an upper limit on how many characters
> a StyledText can contain?
>
> -Ken
>
>
> Ken wrote:
>
>
>>Hello,
>
>
>>I've got a StyledText with a vertical scrollbar that I will be using to
>>log colorized text to. I'm looking for advice on two things..
>
>
>>First, when I append text to the StyledText widget, I need the scrollbar
>>to track the text added and move down accordingly. Basically, if it was at
>>the bottom before it'll stay at the bottom. And if it was at line 500 of
>>1000 when 2 lines were added, it'll move to 502.
>
>
>>Second, I need to keep the log to a fixed number of lines and trim from
>>the beginning when necessary. Is there a preferred/recommended/built-in
>>way to do this?
>
>
>>Thanks in advance!
>
>
>>-Ken
>
>
>
Re: StyledText + Scrollbar issues [message #437541 is a reply to message #437490] Mon, 07 June 2004 14:18 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
That sounds like a bug. Please enter a bugzilla report. You should not
have to move the scroll bar.

"Alfred Fung" <alfred.fungSPAM@businessobjects.com> wrote in message
news:c9qps4$gcm$1@eclipse.org...
> Hello,
>
> Can you offer some more insight in how to move the scrollbar?
>
> In my application I search for text in a StyledText, then I select and
> move the caret using showSelection(). The problem is the scrollbar
> doesn't update to reflect this new position.
>
> - Alfred
>
> Ken wrote:
> > After messing with Swing for as long as I did, some of this has been a
> > heck of a lot easier than I thought it would be.
> >
> > Maybe not as eloquent as it can be, I've got a working solution to both
> > problems that seems to run relatively fast and without too much trouble.
> >
> > So far I've been finding eclipse a LOT more intuitive and simple than
> > Swing.
> >
> > One more question though.. Is there an upper limit on how many
characters
> > a StyledText can contain?
> >
> > -Ken
> >
> >
> > Ken wrote:
> >
> >
> >>Hello,
> >
> >
> >>I've got a StyledText with a vertical scrollbar that I will be using to
> >>log colorized text to. I'm looking for advice on two things..
> >
> >
> >>First, when I append text to the StyledText widget, I need the scrollbar
> >>to track the text added and move down accordingly. Basically, if it was
at
> >>the bottom before it'll stay at the bottom. And if it was at line 500 of
> >>1000 when 2 lines were added, it'll move to 502.
> >
> >
> >>Second, I need to keep the log to a fixed number of lines and trim from
> >>the beginning when necessary. Is there a preferred/recommended/built-in
> >>way to do this?
> >
> >
> >>Thanks in advance!
> >
> >
> >>-Ken
> >
> >
> >
Previous Topic:SashForm and Scrollbars
Next Topic:SWT ColorDialog listener registration
Goto Forum:
  


Current Time: Fri Apr 26 08:29:12 GMT 2024

Powered by FUDForum. Page generated in 0.02016 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top