[whatwg] Canvas ScrollBar

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 
platform. 

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.

HTH,
-- 
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