C codie01 Active Member Licensed User Longtime User Sep 19, 2023 #1 Hi All, I am using ABMCanvas initialized as follows: Code: Copy Dim canvas1 As ABMCanvas canvas1.Initialize(page, "canvas1", ABM.COLOR_Grey, ABM.INTENSITY_LIGHTEN3,canvasWidth,canvasHeight, False) My issue is once it is created, I cannot change the width or height properties without removing the component and recreating it as the is no properties to change like. canvas1.width or canvas1.height Followed by canvas1.refresh. Can some one help advise how to change the height and width without destroying the object. Thanks Phil
Hi All, I am using ABMCanvas initialized as follows: Code: Copy Dim canvas1 As ABMCanvas canvas1.Initialize(page, "canvas1", ABM.COLOR_Grey, ABM.INTENSITY_LIGHTEN3,canvasWidth,canvasHeight, False) My issue is once it is created, I cannot change the width or height properties without removing the component and recreating it as the is no properties to change like. canvas1.width or canvas1.height Followed by canvas1.refresh. Can some one help advise how to change the height and width without destroying the object. Thanks Phil
MichalK73 Well-Known Member Licensed User Longtime User Sep 20, 2023 #2 Is this a large one with resizing by deleting and loading a new Canvas? Upvote 0
C codie01 Active Member Licensed User Longtime User Sep 20, 2023 #3 Yes you lose all the objects on the canvas. I could redraw then all after resizing. Seems a shame when HTML5 has a width and height property. I was hoping maybe I could use something like canvas1.HTMLAddClass("NOT SURE HOW TO USE THIS") Code: Copy canvas.width = 800; canvas.height = 600; Upvote 0
Yes you lose all the objects on the canvas. I could redraw then all after resizing. Seems a shame when HTML5 has a width and height property. I was hoping maybe I could use something like canvas1.HTMLAddClass("NOT SURE HOW TO USE THIS") Code: Copy canvas.width = 800; canvas.height = 600;
alwaysbusy Expert Licensed User Longtime User Sep 20, 2023 #4 That is how a HTML5 canvas works. When you resize it, it clears and you have to redraw. If the last parameter in the initialize = true, then it 'resizes' (responsive). It does however 'scale' (does not make it a bigger or smaller canvas with more drawing estate). Upvote 0
That is how a HTML5 canvas works. When you resize it, it clears and you have to redraw. If the last parameter in the initialize = true, then it 'resizes' (responsive). It does however 'scale' (does not make it a bigger or smaller canvas with more drawing estate).