Hello Everyone!
I try to have a horizontal line in the middle of the text of my label with -fx-text-decoration: line-through; in the style. It is not working.
I expet the second label to be strikethrough but it is not
Thanks for your help
I try to have a horizontal line in the middle of the text of my label with -fx-text-decoration: line-through; in the style. It is not working.
B4X:
#Region Project Attributes
#MainFormWidth: 300
#MainFormHeight: 200
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private styleNormal As String = "-fx-background-color: #FFFFFF;-fx-font-family: Arial;-fx-font-size: 30px;-fx-font-weight: bold;-fx-padding:0"
Private styleSrike As String = $"-fx-background-color: #FFFFFF;-fx-font-family: Arial;-fx-font-size: 30px;-fx-font-weight: bold;-fx-padding:0;
-fx-text-decoration: line-through; "$
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.show()
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Dim lblNormal As Label
lblNormal.Initialize("l1")
lblNormal.Style=styleNormal
lblNormal.text="my text"
MainForm.RootPane.AddNode(lblNormal,10,10,200,40)
Dim lblStroke As Label
lblStroke.Initialize("l2")
lblStroke.Style=styleSrike
lblStroke.text="my text"
MainForm.RootPane.AddNode(lblStroke,10,50,200,40)
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
I expet the second label to be strikethrough but it is not
Thanks for your help