13.0d. Hi, i'm trying to update some old code, and i'm having a hard time resizing canvasitems.
i am playing around with a standard canvas where i just added a VLayout().
I have set a border around the VLayout, and it's much smaller than the cell. I want the layout to always take up the entire CanvasItem contents, whatever it is sized to.
However, i have overridden redraw, setwidth, setheight and they never gets called.
There is no "resizehandler" or listener of any kind that i can see.
I checked the showcase, but there's only one example and there the size is hardcoded.
I tried calling "getWidth" in the constructor of the canvasitem, but size and width is -1.
Maybe i missed something obvious, but what can i do to make the canvasitem dynamically resize its canvas so that it takes up all the size of its parent formitem?
Pointers appreciated.
i am playing around with a standard canvas where i just added a VLayout().
I have set a border around the VLayout, and it's much smaller than the cell. I want the layout to always take up the entire CanvasItem contents, whatever it is sized to.
However, i have overridden redraw, setwidth, setheight and they never gets called.
There is no "resizehandler" or listener of any kind that i can see.
I checked the showcase, but there's only one example and there the size is hardcoded.
I tried calling "getWidth" in the constructor of the canvasitem, but size and width is -1.
Maybe i missed something obvious, but what can i do to make the canvasitem dynamically resize its canvas so that it takes up all the size of its parent formitem?
Pointers appreciated.
Comment