Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Canvas: How to scroll client area
Canvas: How to scroll client area [message #449531] Tue, 25 January 2005 20:58 Go to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
Hi,

I have a Canvas that is scrollable and contains several Text controls.
If you jump from one Text control to the next using TAB, you somewhen
come to a Text control that is not visible (out of the client area).

How can I programmatically scroll the client area of the Canvas so that
the currently selected Text control is visible?

Any help is highly appreciated.

Christian
Re: Canvas: How to scroll client area [message #449533 is a reply to message #449531] Tue, 25 January 2005 21:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shake.web.de

Christian Hauser wrote:
> Hi,
>
> I have a Canvas that is scrollable and contains several Text controls.
> If you jump from one Text control to the next using TAB, you somewhen
> come to a Text control that is not visible (out of the client area).
>
> How can I programmatically scroll the client area of the Canvas so that
> the currently selected Text control is visible?


Maybe this will help you:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet9.java?rev=HEAD&am p;content-type=text/vnd.viewcvs-markup


Johannes Schneider
Re: Canvas: How to scroll client area [message #449538 is a reply to message #449533] Tue, 25 January 2005 23:34 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
>> How can I programmatically scroll the client area of the Canvas so
>> that the currently selected Text control is visible?
>
> Maybe this will help you:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet9.java?rev=HEAD&am p;content-type=text/vnd.viewcvs-markup

This doesn't really help me just as it is. What I would like to have is
a setClientArea method on Canvas. But only getClientArea() exists. So I
need to get hold of the horizontal and vertical bars and call their
setSelection methods?

Still confused,
Christian
Re: Canvas: How to scroll client area [message #449562 is a reply to message #449538] Wed, 26 January 2005 15:12 Go to previous messageGo to next message
Christian Hauser is currently offline Christian HauserFriend
Messages: 189
Registered: July 2009
Senior Member
>> Maybe this will help you:
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet9.java?rev=HEAD&am p;content-type=text/vnd.viewcvs-markup
>
> This doesn't really help me just as it is. What I would like to have is
> a setClientArea method on Canvas. But only getClientArea() exists.

I got it working, but it would have been nice to have a
scrollRectToVisible(Rectangle) method or something similar that does all
this calculating and scrolling for me.

Thanks anyway.
Christian
Re: Canvas: How to scroll client area [message #449563 is a reply to message #449562] Wed, 26 January 2005 15:40 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
> I got it working, but it would have been nice to have a
> scrollRectToVisible(Rectangle) method or something similar that does all
> this calculating and scrolling for me.

Enter a bug report against platform SWT and provide some code showing how
you implemented it
Previous Topic:Refreshing org.eclipse.ui.part.ViewPart
Next Topic:oleAutomation.invoke return problem...
Goto Forum:
  


Current Time: Thu Apr 18 23:46:52 GMT 2024

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

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

Back to the top