[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Scrolling in a basic custom widget that extends Canvas

How do you scroll a custom compound widget that extends a Composite and has a 
basic custom widget as a child apart from other children ?

On Tue, 6 May 2003 16:12:02 -0400
"Veronika Irvine" <veronika_irvine@xxxxxxx> wrote:

> See:
> 
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/sn
> ippits/snippet48.html
> 
> Instead of using the image bounds you will need to use the size of what it
> is you are drawing.  Also note that the example draws on a shell but a shell
> is just a subclass of canvas so you can use canvas instead.
> 
> "Chandresh Prakash" <chandreshprakash@xxxxxxxxxx> wrote in message
> news:20030506222358.68150dc6.chandreshprakash@xxxxxxxxxxxxx
> > I am trying to create a custom widget by extending Canvas.
> > I am painting on the canvas and have both a paintlistener
> > for the purpose and I have also overridden computeSize.
> > But I am not able to get Scrollbars properly for the widget
> > on setting a V_SCROLL | H_SCROLL style to it.
> > The scrollbars do appear but on scrolling they do not show
> > the painted area hidden from view if the display area is not
> > enough.
> > Any ideas ???
> >
> > Thanx in advance,
> >  Chandresh
> 
>