vb.net - for each looping textbox value -
hello guys have problem textbox
each textbox textbox in groupbox1.controls.oftype(of textbox)().orderby(function(b) b.tabindex) textbox.text = 1 textbox.text = 2 next here have 8 textbox
textbox1 textbox2 textbox3 textbox4 textbox5 textbox6 textbox7 textbox8 i want textbox1 = 1 , textbox2 = 2 textbox3 = 1 , textbox4 = 2 , son have try
each abox etcbox in groupbox1.controls.oftype(of textbox)().orderby(function(b) b.tabindex) abox.text = 1 abox.text = 2 different name textbox fail please trying , trying ...
try calling textbox name directcast
for = 1 8 directcast(me.controls.find("textbox" & i, true), textbox).text = next or more check whether or odd , assign accordingly
for = 1 8 if mod 2 = 0 directcast(me.controls.find("textbox" & i, true), textbox).text = "2" else directcast(me.controls.find("textbox" & i, true), textbox).text = "1" end if next i didn't test it, though.
Comments
Post a Comment