Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » scrolling 2 texts
scrolling 2 texts [message #458955] Wed, 27 July 2005 10:33 Go to next message
Eclipse UserFriend
Originally posted by: mkhaoula.IRISA.fr

Hi

I want to be able to scroll 2 texts whith vertical bar at the same time.

I added a selection listener to the vertical bar:

styledT1.getVerticalBar().addSelectionListener(new
org.eclipse.swt.events.SelectionAdapter() {
public void
widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
styledT2.getVerticalBar().setSelection(styledText.getVertica lBar().getSelection());


} {}
});

the problem is that the bar of the second text moves, but text content
doesn't move.

if someone has a solution...

Thanks, Amine
Re: scrolling 2 texts [message #458962 is a reply to message #458955] Wed, 27 July 2005 13:04 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet167.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

Grant

"Mohamed Khaoulami" <mkhaoula@IRISA.fr> wrote in message
news:dc7ntc$imd$1@news.eclipse.org...
> Hi
>
> I want to be able to scroll 2 texts whith vertical bar at the same time.
>
> I added a selection listener to the vertical bar:
>
> styledT1.getVerticalBar().addSelectionListener(new
> org.eclipse.swt.events.SelectionAdapter() {
> public void
> widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
>
styledT2.getVerticalBar().setSelection(styledText.getVertica lBar().getSelect
ion());
>
>
> } {}
> });
>
> the problem is that the bar of the second text moves, but text content
> doesn't move.
>
> if someone has a solution...
>
> Thanks, Amine
>
Re: scrolling 2 texts [message #458967 is a reply to message #458962] Wed, 27 July 2005 14:18 Go to previous message
Eclipse UserFriend
Originally posted by: mkhaoula.IRISA.fr

Grant Gayed wrote:
> see
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet167.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
> Grant
>
> "Mohamed Khaoulami" <mkhaoula@IRISA.fr> wrote in message
> news:dc7ntc$imd$1@news.eclipse.org...
>
>>Hi
>>
>>I want to be able to scroll 2 texts whith vertical bar at the same time.
>>
>>I added a selection listener to the vertical bar:
>>
>>styledT1.getVerticalBar().addSelectionListener(new
>>org.eclipse.swt.events.SelectionAdapter() {
>>public void
>> widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
>>
>
> styledT2.getVerticalBar().setSelection(styledText.getVertica lBar().getSelect
> ion());
>
>>
>>} {}
>>});
>>
>>the problem is that the bar of the second text moves, but text content
>>doesn't move.
>>
>>if someone has a solution...
>>
>>Thanks, Amine
>>
>
>
>
thank you verry much

Amine
Previous Topic:focusLost on a shell
Next Topic:"Unsupported or unrecognized format" reading jpegs
Goto Forum:
  


Current Time: Mon Oct 26 08:19:43 GMT 2020

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

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

Back to the top