Support Request: Align SKHtmlDialog to the right of screen

Description

Hi, I am trying to display always on top dialog over all apps when I hit certain condition. I would like my dialog to behave as cancel button (custom action will be binded to page displayed in dialog - not relevant to this question)

My issue is that I would like to position dialog to the top right of the screen but I am not able to align dialog to the right of screen. Dialog has only Top and Left properties (no Right property). So I wanted to go with workaround Left: #{width_of_screen} - #{width_of_dialog} but I do not know how to get width_of_screen value. I have all my code logic in watchdog.js script which is executed on SiteKiosk startup. My Start Page is static html file and I am using Internet Explorer browser engine.

I display dialog via this code in watchdog.js

 
    var mydialog = SiteKiosk.SiteKioskUI.CreateHTMLDialog();
    mydialog.TopMostWindow = true;
    mydialog.URL = "file://C:/Users/Public/Documents/SiteRemote/Sync/screens/test.html";
    mydialog.Width = 100;
    mydialog.Height = 100;
    mydialog.Top = 0;
    mydialog.ShowDialog();


I tried to get width_of_screen this way but each statement returns nothing:

 
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.MainWindow.Width);
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.MainWindow.Height);
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.MainWindow.Top);
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.ActiveWindow.Width);
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.ActiveWindow.Height);
    SiteKiosk.Logfile.Notification(SiteKiosk.WindowList.ActiveWindow.Top);
    SiteKiosk.Logfile.Notification(SiteKiosk.SiteKioskUI.Workarea.Right);
    SiteKiosk.Logfile.Notification(SiteKiosk.SiteKioskUI.Workarea.Top);
    SiteKiosk.Logfile.Notification(SiteKiosk.SiteKioskUI.Workarea.Left);


Could you give any hint how to position dialog to the right? Thank you

Answer: (1)

Re: Align SKHtmlDialog to the right of screen 9/11/2023 2:48 PM
Hello,

Thank you for your inquiry. Please note that SiteKiosk Classic 9.8 is out of support and our free support does not include support with scripting / customization. However, you can consider using the left value property in the Object Model. The Left property contains the horizontal position of the dialog window.

See link: https://www.sitekiosk.com/helpconsole/SiteKiosk%20Object%20Model%20Help/en-US/default.htm?skhtmldialog_left_prop.htm

Best regards,
Andre.
My Account
Login
Language (Tickets):