Jump to content

How to set client-side height/width of canvas to fit HTMLFrame


HISPhilip

Recommended Posts

Hi,

 

I want to be able to have my canvas fit/stretch to my TUniHTMLFrame but can't seem to find a client-side solution. Right now my HTMLFrame's height and width are managed on the client-side but I don't know how to access the height/width of the client-side HTMLFrame. If I try:

UniSession.AddJS('document.getElementById(''Canvas1'').width = ' + UniHTMLFrame1.Height.ToString + ';'); 

It will adjust the canvas to the VCL size/server-side, aka retain the same canvas size regardless of screen size. Also accessing LayoutConfig.Height and LayoutConfig.Weight do not give me the client-side values as desired.

 

Thanks in advance,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...