Hi
I have been trying to programmatically change the image on a button.
I have the image files in the files directory and can see them in the files pane.
The code i have been trying is:
I just don't get how to set the tb5.Style string so that it gets the file and displays it. How can I do this?
How do you find out how to set up style strings?
Best regards
Rob
I have been trying to programmatically change the image on a button.
I have the image files in the files directory and can see them in the files pane.
The code i have been trying is:
Toggle the image on the button:
Sub tb5_Click
Dim dimStyleStr As String
Dim filename As String
If pnlAlarms.Visible = True Then
pnlAlarms.Visible = False
lw.Visible = False
washPane.Visible =False
dimStyleStr = "-fx-background-image: url(" & Chr(34) & File.DirAssets & "AlarmPageShow.png" & Chr(34) & ")"
tb5.Style = dimStyleStr
Else
pnlAlarms.Visible = True
lw.Visible = True
washPane.Visible = True
dimStyleStr = "-fx-background-image: url(" & File.DirAssets & Chr(34) & "\AlarmPageHide.png" & Chr(34) & ")"
tb5.Style = dimStyleStr
' tb5.Font = fx.CreateFontAwesome(16)
' tb5.Text = Chr(0xF039)
' tb5.TextColor = fx.Colors.From32Bit(0xFF00FF1D)
End If
End Sub
I just don't get how to set the tb5.Style string so that it gets the file and displays it. How can I do this?
How do you find out how to set up style strings?
Best regards
Rob