Hello,
if it is possible to display a value / variable on gui?
I try to place a label and teh setup on code the variable who should display. It is only working after cklick on label.... how it could be display direct an not only after click on label?
[solved ]Display Value on GUI
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 40
- Last visit: Sun Jan 16, 2022 3:44 am
[solved ]Display Value on GUI
Last edited by klarlichter on Thu Nov 21, 2019 5:13 pm, edited 1 time in total.
Re: Display Value on GUI
Values display when they are assigned. I recommend that you take some time to learn PowerShell before trying to work with forms. Without good basic PowerShell knowledge you wil not be able to work with forms.
Also you can look here for help with controls: https://info.sapien.com/index.php/guis/ ... el-control
Also you can look here for help with controls: https://info.sapien.com/index.php/guis/ ... el-control
-
- Posts: 40
- Last visit: Sun Jan 16, 2022 3:44 am
Re: Display Value on GUI
Hi. Bitty step by step. I read that page before. That’s why I ask. I place the label. But I not want show default level text. I want show some variable like $output = „my text“ but that working only after klick ob label1. I would like override label1 while that form start to display.
-
- Posts: 40
- Last visit: Sun Jan 16, 2022 3:44 am
Re: Display Value on GUI
That I try but it change ‚my text‘ only after I click on label1... it not display while the form are open.
-
- Posts: 40
- Last visit: Sun Jan 16, 2022 3:44 am
Re: Display Value on GUI
Ok,
I find. That Command $label1.Text = 'my Text' need placed on
Then it will be worked. Thanks a lot.
I find. That Command $label1.Text = 'my Text' need placed on
Code: Select all
$MainForm_Load={
#TODO: Initialize Form Controls here
$label1.Text = 'my Text'
}
Re: [solved ]Display Value on GUI
Here is a good free book on PowerShell. It has a chapter on designing and building with WinForms.
https://www.sapien.com/books_training/W ... werShell-4
See Chapter 21.
https://www.sapien.com/books_training/W ... werShell-4
See Chapter 21.