AdvancedHMI Software
General Category => Support Questions => Topic started by: Efabe on March 09, 2021, 01:11:38 PM
-
Good Afternoon
Greetings from Portugal!
I'am new at AdvancedHmi making now my first application.
I have a basic question, Is it possible to display words based on boolean value with basiclabel?
I
-
The BooleanDisplay property gives a limited number of options. Or you could modify the code for the BasicLabel
-
Thank you for the fast response.
And congratulations for your work.
Do you have any little example ou to manipulate de code of basiclabel?
Would this works?
Private Sub BasicLabel(sender As Object, e As EventArgs) Handles BasicLabel1.ValueChanged
If BasicLabel1.PLCAddressValue = False Then
BasicLabel1.Text = "Texto"
Else
BasicLabel1.Text = "Texto 34"
End If
End Sub
More one time.
Thank you
-
- In Solution Explorer expand down the AdvancedHMIControls project
- Expand down the Controls Folder
- Right Click BasicLabel.vb and select View Code
- Go to Line 294 and look for the code:
Public Enum BooleanDisplayOption
TrueFalse
YesNo
OnOff
OneZero
EnabledDisabled
AutoManual
End Enum
- Add Additional Options
- Then go to line 551 and look for this line of code:
If (String.Compare(m_Value, "True", True) = 0) Then
- Follow the pattern and add If=Then for the options you added above