Jump to content

THtmlFrame , resize and text size


jptec

Recommended Posts

HI,

 

I m new to the uniGui. I would like use htmlframe as my index page ( which is responsive ).  However I hit the follow case.

 

Please advise:

 

I first do a html page and test it in normal web server. It is working correctly. Then I copy all the html code and css etc.. UniGUI project which put into the THtmlFrame.

 

1. The Text font size in web server version is bigger than the uniproject version.

 

2. as the picture slide feature is windows wide no matter how resize. 

-> In web server, it is working correctly, no matter how resize it is as expected.

-> In UniGUI project, first load the page the picture slide not fit to the windows width. After resize it with mouse can fit windows width but the page layout ratio is not correct.

 

I attached the picture for reference. the address 127.0.0.1 is web server one and 10.18.18.34:8077 is UniProject.

 

Web Server Version

post-3755-0-41251800-1481951787_thumb.jpg

 

UniGUi Project

post-3755-0-81239900-1481951805_thumb.jpg

 

Compare to 

post-3755-0-91740300-1481951794_thumb.jpg

 

 

Please advise above the case how to solve

 

 

Joe

Link to comment
Share on other sites

In your code you probably need some JS to catch the browser

resize, and what I would use is something like this pseudocode:

 

window.addEventListener('resize', resizeFrame, true);
  function resizeFrame() {
    sliderbox.width = MainForm.htmlFrame.getWidth();
    sliderbox.height = MainForm.htmlFrame.getHeight();
    drawSlider();
  }

 

If you can post your project, someone can take a closer look at it.

Link to comment
Share on other sites

Dear All,

 

I've set to alclient , and tested the alignmentcontrol either to server or client. it is not as my expectation.

 

Also a bit confused if put css in ServerModule - customcss property and individual file in ServerModule - customfiles or put within the htmlframe. Any difference?

 

if really the conflict on the css , any better approach?

 

You can download my sample project: http://175.45.23.206:8888/download/temp/autoslide.zip

 

You can download my referenced html: http://175.45.23.206:8888/download/temp/samplehtml.zip

 

 

 

As I new to css and html handling, any advice is appreciated.

 

Joe

Link to comment
Share on other sites

First use chrom->Inspect (CTRL+SHFT+I) it's very useful, and examine the width, height, top, left...

 

When resizing the window it depends in how the user resize it:

 

- Does he use the [min][max] buttons

- Does he use the mouse to scale (drag) the size. 

 

Second consider using a more advanced solution for triggering resize such: https://github.com/louisremi/jquery-smartresize

 

We already build a Jquery components using these methods you can download from here http://forums.unigui.com/index.php?/topic/5995-circle-progress-jquery-widget-fully-customized/ and see how we trigger the resize events.

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