Resizing controls manually

I have three WebListBoxes on my web page.
When the Resized event is fired I set the top left and height of each of the three WebListBoxes such that the three are the same size and occupy the page equally from top to bottom.

[code]dim y1 as integer =
dim y2 as integer = self.height

System.DebugLog("y1 = " + str(y1))
System.DebugLog("y2 = " + str(y2))[/code][quote]2013-07-09 10:25:31.371 AM My Application.debug[10405]: y1 = 232
2013-07-09 10:25:31.371 AM My Application.debug[10405]: y2 = 317[/quote]
For some reason height is only 317… which is not true.

If I use my mouse and just nudge the bottom of the web page to make it resize THEN it works perfectly.

[quote]2013-07-09 10:27:16.257 AM My Application.debug[10405]: y1 = 232
2013-07-09 10:27:16.257 AM My Application.debug[10405]: y2 = 1092[/quote]
Am I missing something in the order of which events are fired and am not drawing my interface in the right event?
Is this something to do with the min/max height?

I’m not sure I follow. Do the control end up sized properly? Do you have a sample project you can share? Does control locking work for you?

On the second resize event thing works, but not the first.
(The second resize is me tweeking the window size slightly)

I’m still not sure exactly what you are doing. Go ahead and create a Feedback case with an example that demonstrates this and I’ll take a look.

I have made a test application to give you. Problem is… The test page does what it is supposed to to.


The size for the Resized event is reported from the innerWidth and innerHeight of one of the

tags on the web page. I have seen with Safari on iPhone that an incorrect report of the size seems to made with the first Resized event. Might also happen on other browsers. I’d say this is a browser quirl/bug rather than a Xojo framework problem. Xojo is just relaying what the browser reports.

I’ve treated it as a small annoyance, because it hasn’t gotten in my way. If it really gets in your way, a couple things you might try. One, keep track of how many “Resized” events you’ve gotten, either for the session or the page, whatever works. Only resize stuff on second and later. Or, when first is received, start a 1 second WebTimer and resize in that action if you haven’t received a subsequent Resized. It’s ugly I know, but that’s how the client server dance is typically patched up.

Oddly enough this is exactly what I tried. (Putting a counter in resize and if its the first do nothing and adding a timer to and calling the resize commands.)

But it would seem that without physically changing the size of the window that the size does not change. My thought at the moment is that my login splash page which switches to the app page is not the same size as the login page. I thought well maybe it’s a timing issue, but I’m not the one firing the resize event. It goes through the Open, Shown, Resize events just as I thought they should.

What browser(s) and version(s) are you seeing this in?

I’ve tried:
safari 6.0.5,
chrome 28.0.1500.71
firefox 22.0

I just noticed that the bottom of the login WebContainerControl… is at the same location as the software thinks is the bottom of the new page.

I took the login container control off of the splash screen and created it in code to display on the login web page.
Now things work perfectly.
I hope that is somehow helpful to others who may be experiencing this.