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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -