In the previous steps, you have creted a new panel. In this chapter you will see several examples of opening such panel.
Selection from a list:
Press the "Panels
" icon in the toolbar in the running application in order to open the window with the list of application panels included into this list.
In this case mark the window "Panel of Boiler no. 1"
and press the OK
Button in panel:
Second way of opening the panel "Panel"
could be by the control button placed in the panel that is opened after starting the application.
Open the panel named "MainPanel
" in the graphics editor. Insert the Preconfiguration "single state - only text"
object anywhere in it from the One-state button
Then its configuration window opens.
- Enter the description of the button, for example, "Boiler1" into the "Text
- In the "Action
" configurator select "Open panel - in main frame (target:main;)" from a list.
- Then in the "Path to panel
" configurator set the path to panel "Panel"
– Relative path to: MainPanel and confirm by the "OK" button. Then place the button to the panel.
Image as button:
The third way of opening the "Panel"
window can be done by clicking the mouse over any image located in the panel.
Open the window named "MainPanel
" in the graphics editor. Insert the HeatOven02.svg
object anywhere in it from the Image group.
By clicking this object, its configuration window opens.
Select the "Events
" tab. Then select the onMousePress
Open the menu by clicking the right mouse button and select Script wizard.
- Then move the cursor between the braces.
The Script wizard will create the following:
This way you call the Pm.CreateView
method over the "Panel"
object. This method opens the viewer of the "Panel"
object. The content is now displayed in the same window as the content of the MainPanel
Confirm everything by the OK
button ans save. After starting the application, new button with the description "Boiler1" appears in the panel. Once you click the boiler image or click and release this button, the window "Panel of Boiler no. 1" opens.