Embedwithin on a dialogcontrol, possible ?

  1. 5 months ago

    Helge T

    Mar 20 Pre-Release Testers, Xojo Pro Europe (Oslo, Norway)
    Edited 5 months ago

    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.

  2. Michel B

    Mar 20 Pre-Release Testers Answer RubberViews.com

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

  3. Helge T

    Mar 20 Pre-Release Testers, Xojo Pro Europe (Oslo, Norway)

    Aha, I did not know. Thanks

  4. Helge T

    Mar 20 Pre-Release Testers, Xojo Pro Europe (Oslo, Norway)

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

  5. Helge T

    Mar 20 Pre-Release Testers, Xojo Pro Europe (Oslo, Norway)

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

  6. Michel B

    Mar 20 Pre-Release Testers RubberViews.com
    Edited 5 months ago

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

    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.

    Feedback Case #33121

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

    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);"
      
      me.ExecuteJavaScript(js)
    End Sub

    To get these values from JavaScript in Xojo, you can use WebSDK or the technique described here :
    https://forum.xojo.com/22633-get-javascript-variables-back-from-htmlviewer-without-changing-/0

  7. 2 months ago

    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!

  8. Michel B

    Jun 13 Pre-Release Testers RubberViews.com

    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.

or Sign Up to reply!