This content has been marked as final. Show 5 replies
Perhaps I am not understanding, but you can explictily set the widht and height properties of a Canvas.
I can set the height and width of the canvas so that it displays on the screen at that height and width.
But i want to set the height and width of its contents, without having to actually place a child inside the canvas. Such that an empty canvas would have scroll bars that could scroll around.
Hope that helps clear up my query
You can set horizontal and vertical scrollPolicy to on, which will show scroll bars, but if there is nothing to scroll, ie no children, well, there will be nothing to scroll.
What are you trying to accomplish?
I am trying to develop a component, that is based on a canvas that will be drag scrollable with the mouse, similar to various mapping components such as yahoo maps and google maps. I want the internal components of the canvas to only be loaded when they will be shown.
The problem is that they are not always present in the canvas so the internal space in the canvas appears smaller than it actually is because the components are not created yet. You are unable to scroll around as it thinks there are no components there, when they will be there but just not created quite yet.