DetachedWindow
interface cAlgo.API
DesktopCLICloud
Used to represent the properties of a detached window.
Environment behaviour
CLI — not supported. Values start at 0 and are only stored in the algo; no window is read or changed.
Cloud — not supported. Values start at 0 and are only stored in the algo; no window is read or changed.
Definition
public interface DetachedWindow
Namespace: cAlgo.API · Group: Windows
Remarks
Its being used by UI components that can be detached on a separate window and algos can use it to manage that detached window.
Examples
var block = Asp.SymbolTab.AddBlock("Risk calculator");
var detachedWindow = block.DetachedWindow;
detachedWindow.Width = 400;
detachedWindow.Height = 300;
detachedWindow.ResizeMode = ResizeMode.CanResize;
detachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
Print("Detached window size: {0}x{1}", detachedWindow.Width, detachedWindow.Height);
block = api.Asp.SymbolTab.AddBlock("Risk calculator")
detachedWindow = block.DetachedWindow
detachedWindow.Width = 400
detachedWindow.Height = 300
detachedWindow.ResizeMode = ResizeMode.CanResize
detachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen
api.Print(f"Detached window size: {detachedWindow.Width}x{detachedWindow.Height}")
Properties
| Name | Description |
|---|---|
HeightDesktopCLIClouddouble | Get / Set height of the Window |
LeftDesktopCLIClouddouble | Get / Set window left margin (X) |
MaxHeightDesktopCLIClouddouble | Get / Set the window maximum height |
MaxWidthDesktopCLIClouddouble | Get / Set the window maximum width |
MinHeightDesktopCLIClouddouble | Get / Set the window minimum height |
MinWidthDesktopCLIClouddouble | Get / Set the window minimum width |
ResizeModeDesktopCLICloudResizeMode | Get / Set the window resize mode |
TopDesktopCLIClouddouble | Get / Set window top margin (Y) |
WidthDesktopCLIClouddouble | Get / Set width of the window |
WindowStartupLocationDesktopCLICloudWindowStartupLocation | Get / Set the window startup location |