Announcement

Collapse
No announcement yet.

set dialog position in...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • set dialog position in...

    Hi to all, to put the
    Xdialog in the lower
    right corner what do I
    do?
    Also:
    Bottom left corner?
    The upper left corner?
    The upper right corner?

    help me...

  • #2
    System.GetDisplayInfo() gives you the dimension of the desktop, and with Window.GetSize(DialogEx.GetWndHandle()) you can get the dimension of the dialog with its frame. Both results are tables, indexed with "Width" and "Height" fields.

    If you want to place the DialogEx in the lower right corner, you would typically use something like this as a starting point:
    Code:
    local tDesktop = System.GetDisplayInfo();
    local hWnd = DialogEx.GetWndHandle();
    local tWindow = Window.GetSize(hWnd);
    Window.SetPos(hWnd, tDesktop.Width-tWindow.Width,  tDesktop.Height-tWindow.Height - 40);
    I am subtracting 40 from the Y position because of the height of the taskbar. If you don't do this, the DialogEx will be partially hidden behind the taskbar at the bottom. If you have the task bar at the right, obviously you would need to move the DialogEx more to the left.

    Ulrich

    Comment


    • #3
      hi

      Is it possible to create a model for
      all corners as apz?

      Comment


      • #4
        It is, but I leave that to you. This would be basic arithmetic, which, with the explanations given previously, I am sure you are perfectly capable of performing by yourself.

        Ulrich

        Comment

        Working...
        X