CastleSoft Posted July 30, 2018 Share Posted July 30, 2018 I have a custom control based on TUniCustomHTMLFrame which works with a <canvas> element. I have a Javascript function called resizeCanv() which is as follows: function resizeCanv(){ var canvas = $( "canvas#'+JSName+'" )[0]; canvas.width = canvas.parentElement.clientWidth; canvas.height = canvas.parentElement.clientHeight; } In my TUniFAKECanvas controls .create the HTML.Text is set to <canvas id="'+JSName+'"></canvas> and the resizeCanv() is called. It all works great. I then added the Align to allow me to use 'client' for sizing. When the form is resized, the HTMLFrame resizes ok, but I need to call my resizeCanv() javascript function. Inside the custom control, what should I hook / trap and whats the recommended way inside a custom control to trap a forms align=client so the child controls can be resized/moved etc ? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now