1 person found this helpful
You could set percentage values as width and height and also provide maxHeight , maxWidth, minWidth and minHeight to limit how big or small your components get.
Thank you for the tip... this solves my problem partially. Now I am working on to scale the inner content of canvas --- on resize. Since there are elements like buttons and images, i can not define them in percentage, so i need to first check what exactly is the percentage of reduced canvas, and then accordingly i'll have to apply that percent on the inner elements. Any other better idea? as i see this only as a work around, not a proper solution.
Anyway thanks again for the help.
When you are working with Canvas, you use the left, right, top, bottom, horizontalCenter and verticalCenter style properties to make things resize.
See FB 3 help sys or LiveDocs on constraint based layout.
Or use a VBox inside the Canvas, but then you wouldn't be using a Canvas would you?