Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webapplication.FormWidth inaccurate
#1
Hi there.  I have been batting my head against a wall and I cannot seem to find a reliable way to get the form width at the client.  Every browser is different and is really frustrating.  I am trying to place a button to the right of the screen floating and cannot get a correct number to use for the left property.  I tried to anchor right with no left and the button will just flip to the left of the screen whenever there is an ajax event so I have to set the left.  I am using IW Version: 15.1.7.

I have a region with align top that I even tried to get its width in the onRender form event (see code below).  THis has to be in the OnRender Event from what I have been seeing or the numbers are different and worse.

if (Webapplication.FormWidth < Self.Width) then
    iWidth := Webapplication.FormWidth
  else
    iWidth := Self.Width;
  if (iWidth > RegionHeaderTop.Width) then
    iWidth := RegionHeaderTop.Width;


I am using 3 widths here to try to get the smallest to then use for my screen calculation but nothing is 100% reliable.  From what I am seeing, there seems to be reliance of what the width is in design mode to what the last form was that the user loaded.  At least with this code in the OnRender Event the button is somewhat stable.

Is there anyway to RELIABLY get the form width when the CURRENT form is loading in the browser?

Cheers.
Reply


Messages In This Thread
Webapplication.FormWidth inaccurate - by bob9999 - 01-02-2020, 04:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)