Read Text Label by Length VB.net -
i have label1
' text in = 10500
, label2
, , if label1.text.length = 5
label2.text = label1.text.length=3
(i want label2 text 5 because number 5 label text length 3, if use code :
label1.text = "10500" if homepage.label1.text.length = 5 homepage.label2.text = homepage.label1.text.length = 3 end if
label2 show code "false" want label2 show code label1.text in length 3, can help?
you assigning label2 boolean
label1.text = "10500" if homepage.label1.text.length = 5 homepage.label2.text = homepage.label1.text.length = 3 end if
this part wrong: homepage.label2.text = homepage.label1.text.length = 3
homepage.label1.text.length = 3 evaluates false or true
if understood right, need this
label1.text = "10500" if homepage.label1.text.length = 5 if homepage.label1.text.length = 3 homepage.label2.text = homepage.label1.text.substring(3, 1) end if end if
Comments
Post a Comment