|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
[Newbie]Hi,
Just a simple question for witch I can't find an solution. I've got 4 labels in a form : lbl1, lbl2, lbl3, lbl4. I want to give them a value in a FOR instruction. Something like : FOR iCpt = ... ("lbl" & iCpt).text = "My Value" NEXT I've searched MSDN, Google, TechNet but I must be dumm ! Thanks. -- Ami Calmant Stéphane Stéphane Miqueu avait prétendu :
Show quoteHide quote > Hi, Thanks, I've got the answer :> > Just a simple question for witch I can't find an solution. > > I've got 4 labels in a form : lbl1, lbl2, lbl3, lbl4. > I want to give them a value in a FOR instruction. Something like : > > FOR iCpt = ... > ("lbl" & iCpt).text = "My Value" > NEXT > > I've searched MSDN, Google, TechNet but I must be dumm ! > > Thanks. In the form class : Dim MyLabels as Label() In the form load : Me.MyLabels = New Label(){Me.lbl1, Me.lbl2, Me.lbl3, Me.lbl4} Somewhere : For iCpt = 0 To 3 MyLabels(iCpt).Text = "MyValue" Next -- Ami Calmant Stéphane Stéphane Miqueu wrote:
Show quoteHide quote > Hi, Not very good at this but have you tried an array of textbox...> > Just a simple question for witch I can't find an solution. > > I've got 4 labels in a form : lbl1, lbl2, lbl3, lbl4. > I want to give them a value in a FOR instruction. Something like : > > FOR iCpt = ... > ("lbl" & iCpt).text = "My Value" > NEXT > > I've searched MSDN, Google, TechNet but I must be dumm ! > > Thanks. > ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- me avait prétendu :
> Not very good at this but have you tried an array of textbox... Thanks, it's the same thing. Instead of using textbox, I use labels.> -- Ami Calmant Stéphane
Creating a form object from string name
rewriting URL SerlializationException Please help, about primary key and dataset xml file format Anchoring problem StreamReader/StreamWriter problem Function and Class question Dynamically iterating through log files passing parameter to class from application |
|||||||||||||||||||||||