In my application I instantiate my WebContainers at run time.
Session.myControl = new myControl
dim w as integer = Session.myControl.Width
dim h as integer = Session.myControl.Height
Session.myControl.EmbedWithin(self, 0, 0, w, h)
Session.myControl.ShowCenteredInParent(self) // Sets left top of control so centered in parent window.
[/code]
[code]Sub ShowCenteredInParent(parent as WebPage)
Left = (parent.width - Width) / 2
top = (parent.height - Height) / 2
if left < 0 then left = 0
if top < 0 then top = 0
if left > parent.width then left = 0
if top > parent.height then top = 0
if Width = 0 then
System.DebugLog("Wait a second. w=" + str(Width) + " h=" + str(Height))
end if
Visible = true
End Sub
Since migrating to Xojo from RS this control just stopped appearing when it should… or use to.
However no other control has show this behavior. (All my other controls appear as normal)
The debug log, shows that Width and Height are 0.
I looked in the IDE and the width and height are 477, 875…
I’m confused. Maybe there are some properties that aren’t set unless the control has been open?