Ticket ID: 26554
|
Creation Date: 9/10/2023 11:33 PM
|
Product: SiteKiosk Classic Windows
|
Attachment: -
|
TicketType: Support Request
|
Version: 9.8.5779
|
Language: English
|
Views: 5489
|
Last Modification Date: 10/9/2023 3:24 PM
|
Platform:
|
|
Level: Closed
|
|
|
Support Request: Align SKHtmlDialog to the right of screen
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