Jump to content

urlframe size


jahlxx

Recommended Posts

Hi.

 

I try to explain what I need.

I have a URLFrame, align=alclient.

I generate a report in HTML, with FR, , in A4 page size,  and show that report in the URLFrame.

Everything is OK, but I need to show the report with its width equal to the width of the frame. I can't find any option about zoom or similar.

Any Idea?

Thanks.

 

Link to comment
Share on other sites

if you sclae your content - would it help?

.. like 

-webkit-transform: scale(0.7);

the scale factor is depending on screen width and hight ...  so you can react on uniGui-screenresize-event to calculate the factor

i use allways no css-file and no unigui-css-methode ..

i put a UniHTMLFrame1 on mainform and write css depending on some situations ...

Example:

  UniHTMLFrame1.HTML.Clear;
  UniHTMLFrame1.HTML.Append('  <link href="/files/css/font_Exo.css" rel="stylesheet">');
  UniHTMLFrame1.HTML.Append('  <link href="/files/css/font_Open.css" rel="stylesheet">');

  UniHTMLFrame1.HTML.Append('<style>  ');

  UniHTMLFrame1.HTML.Append('::-webkit-scrollbar {  width: 5px;   height: 14px; }');
  UniHTMLFrame1.HTML.Append('::-webkit-scrollbar-button {   width: 10px;   height: 10px; } ');

 

so i can change css with delphi

 

i would use this solution: ... https://stackoverflow.com/questions/166160/how-can-i-scale-the-content-of-an-iframe

hth

Erich

 

Link to comment
Share on other sites

Hi.

I almost have.

Doing this:

    UniURLFrame1.JSInterface.JSCall('el.setStyle', ['transform', 'scale(1.3)']);
    UniURLFrame1.JSInterface.JSCall('el.setStyle', ['transform-origin', 'top center']);

I thnik this is easyest than proposed solutions before.

The zoom is OK, and the position is OK, but the right scrollbar of the frame disappears, and the report is cut in bottom.

Any idea?

Thanks.

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...