"Hack" indeed! I like to think of this as a technical work-around
Just to clarify Karstein's excellent post:
At present, there is no way of using the GUI to lock widgets or drawing components on a page. However, by making a few edits on the page source file, you can achieve the same effect.
Note that this is an advanced topic. To learn more about these advanced topics, I would strongly recommend attending one of the excellent Advanced courses offered by Trihedral.
The steps required:
In the VTScada Idea Studio, on the Home ribbon, click on the Source Code icon. This will open the page source code in your favourite text editor.
Create a child module - in Karstein's it was called "LockedStuff". The declaration goes at the top between the [ and ] of the Page code. The module itself is declared below the Main state in the page.
The child module should be called from the main state of the Page file. It should be the first thing called, since this will keep the Z Order of the locked components behind everything else rendered on the page.
Move any components you wish to be locked in to the child module.
Re-import the modified page source file and the job is done.
Here is an example page source. The Ellipse is locked to the background, whilst the Rectangle remains movable.
[
Title = "Overview";
LockedStuff Module { Locked graphic components };
]
Main [
Return(Self);
{ started the LockStuff Child module }
LockedStuff();
GUIRectangle(13, 151, 113, 51,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Brush("<FFA0A0A0>", 0, 1), Pen("<FF000000>", 1, 1));
]
<
{=========================== Overview\LockedStuff ============================}
{ Draws the locked components on the screen }
{=============================================================================}
LockedStuff
Main [
GUIEllipse(581, 136, 718, 66,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Brush("<FFA0A0A0>", 0, 1), Pen("<FF000000>", 1, 1));
]
{ End of Overview\LockedStuff }
>
Hope this helps!
"Hack" indeed! I like to think of this as a technical work-around :)
Just to clarify Karstein's excellent post:
At present, there is no way of using the GUI to lock widgets or drawing components on a page. However, by making a few edits on the page source file, you can achieve the same effect.
Note that this is an advanced topic. To learn more about these advanced topics, I would strongly recommend attending one of the excellent Advanced courses offered by Trihedral.
The steps required:
1. In the VTScada Idea Studio, on the Home ribbon, click on the Source Code icon. This will open the page source code in your favourite text editor.
2. Create a child module - in Karstein's it was called "LockedStuff". The declaration goes at the top between the [ and ] of the Page code. The module itself is declared below the Main state in the page.
3. The child module should be called from the main state of the Page file. It should be the first thing called, since this will keep the Z Order of the locked components behind everything else rendered on the page.
4. Move any components you wish to be locked in to the child module.
5. Re-import the modified page source file and the job is done.
Here is an example page source. The Ellipse is locked to the background, whilst the Rectangle remains movable.
````
[
Title = "Overview";
LockedStuff Module { Locked graphic components };
]
Main [
Return(Self);
{ started the LockStuff Child module }
LockedStuff();
GUIRectangle(13, 151, 113, 51,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Brush("<FFA0A0A0>", 0, 1), Pen("<FF000000>", 1, 1));
]
<
{=========================== Overview\LockedStuff ============================}
{ Draws the locked components on the screen }
{=============================================================================}
LockedStuff
Main [
GUIEllipse(581, 136, 718, 66,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Brush("<FFA0A0A0>", 0, 1), Pen("<FF000000>", 1, 1));
]
{ End of Overview\LockedStuff }
>
````
Hope this helps!
Keith Donaldson
Director of Business Development
Trihedral UK Limited
+44 (0)1224 258915
keith.donaldson@trihedral.com