Embedwithin on a dialogcontrol, possible ?

Hi, I have used a lot of embedwithin on pages, but trying to do it on a dialog-control set to sheep, seems not to work… the x pos is set to page left and not dialog left…

any ideas?

This is a known bug. Modal dialogs report the page left and not the dialog left.

Aha, I did not know. Thanks

But, will i be able to see in Feedback, when it will be fixed ?

I’ll use palette and have it free floating inside the window. Thats ok for now.

It is an old issue. I am not even sure it gets any attention. I had to do some JavaScript voodoo to get RubberViewsWE to work.


This in the Shown even of the modal dialog will report the actual left and top into the programmer’s tools Console :

[code]Sub Shown() Handles Shown
dim js as string

js = js + “var dlg = document.getElementById('”+me.controlID+“_body’) ;”
js = js + “console.log(dlg.offsetLeft);”
js = js + “console.log(dlg.offsetTop);”

End Sub

To get these values from JavaScript in Xojo, you can use WebSDK or the technique described here :

Thanks Michel. I totally understand the js code, but very lost on how to pull data back from javascript into Xojo.

However, I did solve my problem a different way. What I did was create a parent WebContainer control and placed in the desired area in my modal webdialog. My dynamic controls were then embedded within the parent webcontainer as opposed to the webdialog.

Thanks again!

Glad you solved your problem in another way. But to get values back, I linked to a method that you can use at the end of my post.