W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] Canvas ScrollBar

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 27 Jan 2012 19:02:59 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1201271859190.16982@ps20323.dreamhostps.com>
On Thu, 20 Oct 2011, Bronislav Klu?~Mka wrote:
> Would it be possible to extend canvas specification to include scroll 
> bar functionality? To add scroll bar, to manage scroll bar (total size, 
> page size). Creating control based on canvas that needs scrollbar at 
> this point is unnecessarily difficult at this point.

It is expected that the component model feature being discussed in the 
public-webapps at w3.org mailing list will be how you make widgets on the 

You wouldn't want to put the scrollbar in the canvas itself, since then it 
wouldn't follow platform native conventions, for example. Instead, you 
would create a widget which uses overflow:scroll with an element of the 
right height or width to create scrollbars, and then you would react to 
scroll events to repaint the canvas.

On Thu, 20 Oct 2011, Bronislav Klu?~Mka wrote:
> b) how about creating user controls using canvas? (rich controls are 
> better doing this way, one has pixel perfect control, full browser 
> compatibility) like document viewer, rich listview/treeview control...

Generally speaking, canvas isn't intended for anything but the simplest of 
interactive controls.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 27 January 2012 11:02:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC