PDA

View Full Version : Dynamic web browser resize problem


robmaggs
02-15-2009, 08:15 AM
Hi I found an excellent example of dynamic resizing of an application by Desmond

http://www.indigorose.com/forums/showthread.php?t=12949&highlight=browser

This great bit of code does a wonderful job, but if I add a new page and link to that by a button, when I jump to the new page the objects are not dynamically resized. However if I then maximize the window everything resizes as it should.

Is this a bug or does the new page need a new resize function?

Here's an example:

http://img158.imageshack.us/img158/1711/resizedxx9.th.jpg (http://img158.imageshack.us/my.php?image=resizedxx9.jpg)

I can't see whatI'mdoing wrong, any help would be greatly appreciated.

Many thanks Rob :)

(The file I was working on is also attached)

Imagine Programming
02-15-2009, 09:58 AM
Do you use AMS 7.5? if so dynamicly resizing apps is very easy...

experiment with the Auto-Resize options in the Attributes tab in the object properties window.

justanumber
02-15-2009, 11:39 AM
Thanks CB, that solved a nagging question I had too.

One other question:

Taking the "browser" project in 7.5. I got it where I
can resize the window and the contents resize with
it using your tip. Do you know how I can center the
buttons at the bottom? All I can get is them to the
left or right of the window, can't figure out center.

Thanks much,

Terry

Imagine Programming
02-15-2009, 12:12 PM
-- On Size in a page...
-- hasn't been tested though
local tblW = System.GetDisplayInfo();
local tblB = Button.GetSize("Button1")

Button.SetPos("Button1", (tblW.Width/2)-(tblB.Width/2), Button.GetPos("Button1").Y)

robmaggs
02-15-2009, 12:53 PM
Thanks CB...Your solution works well.The newer version handles it with no problem.

Thanks again for your time :)

Imagine Programming
02-15-2009, 07:05 PM
No problem, it's nice to help :D