Dialogの座標取得

【ご質問】
現在表示しているDialogの左上の座標(X,Y)を
Windowの左上隅基準で取得する方法はあるのでしょうか?。

【回答】
{Dialog.get-view}.get-window-position}でDialogの座標を取得することが可能です。

{curl 6.0,7.0,8.0 applet}
{curl-file-attributes character-encoding = “shift-jis”}

{let btn:CommandButton = {CommandButton
                                              label = “ポップアップ表示”
                                       }
}
{let btn2:CommandButton = {CommandButton
                                              label = “座標を表示”
                                         }
}
{let from-window:VBox = {VBox}}
{let v:VBox = {VBox
                        {Fill height = 0.1cm},
                        btn2,
                        {Fill height = 0.1cm},
                        “Windowからの座標は・・・”,
                        from-window
                    }
}
{let myDialog:Dialog = {Dialog
                                     width = 5cm,
                                     height = 5cm,
                                     v
                                 }
}

{btn.add-event-handler
    {on Action do
        {myDialog.show}
    }
}
{btn2.add-event-handler
    {on Action do
        {from-window.clear}
        {let (x:Distance, y:Distance) = {{myDialog.get-view}.get-window-position}}
        {from-window.add
            {VBox
                {HBox “X = “, x},
                {HBox “Y = “, y}
            }
        }
    }
}

{VBox
    btn
}