Click here to Skip to main content
14,774,702 members
Home » Discussions » C#
   

C#

 
AnswerRe: Variable for number of days Pin
Gerry Schmitz16-Nov-20 7:58
mveGerry Schmitz16-Nov-20 7:58 
GeneralRe: Variable for number of days Pin
Richard Deeming16-Nov-20 22:41
mveRichard Deeming16-Nov-20 22:41 
GeneralRe: Variable for number of days Pin
Gerry Schmitz17-Nov-20 5:57
mveGerry Schmitz17-Nov-20 5:57 
GeneralRe: Variable for number of days Pin
Richard Deeming17-Nov-20 18:35
mveRichard Deeming17-Nov-20 18:35 
GeneralRe: Variable for number of days Pin
Gerry Schmitz17-Nov-20 21:52
mveGerry Schmitz17-Nov-20 21:52 
AnswerRe: Variable for number of days Pin
Richard Deeming16-Nov-20 22:43
mveRichard Deeming16-Nov-20 22:43 
GeneralRe: Variable for number of days Pin
pkfox18-Nov-20 22:11
professionalpkfox18-Nov-20 22:11 
QuestionChanging the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 5:55
MemberRon_UK16-Nov-20 5:55 
Hello Smile | :)

My first post on here, would really appreciate some help.

I'm programming in C# (Visual Studio .NET Forms).

My form has 9 labels and i'm trying to change the visibility properties of all the labels in a loop instead of changing them individually.

For example :

label1.Visibility = true;
label2.Visibility = true;
label3.Visibility = true;
label4.Visibility = true;
label5.Visibility = true;
label6.Visibility = true;
label7.Visibility = true;
label8.Visibility = true;
label9.Visibility = true;

Instead of using the above laborious method, use some kind of for loop instead to select the labels number to make the changes, is this possible?

Many thanks
Ron Thumbs Up | :thumbsup:
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
Pete O'Hanlon16-Nov-20 6:00
mvePete O'Hanlon16-Nov-20 6:00 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 6:17
MemberRon_UK16-Nov-20 6:17 
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 6:06
mveOriginalGriff16-Nov-20 6:06 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ralf Meier16-Nov-20 6:16
professionalRalf Meier16-Nov-20 6:16 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 6:27
mveOriginalGriff16-Nov-20 6:27 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 6:36
MemberRon_UK16-Nov-20 6:36 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 6:48
mveOriginalGriff16-Nov-20 6:48 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 6:58
MemberRon_UK16-Nov-20 6:58 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 6:19
MemberRon_UK16-Nov-20 6:19 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 6:27
mveOriginalGriff16-Nov-20 6:27 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 9:39
MemberRon_UK16-Nov-20 9:39 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 10:29
mveOriginalGriff16-Nov-20 10:29 
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
Luc Pattyn16-Nov-20 6:30
sitebuilderLuc Pattyn16-Nov-20 6:30 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 6:40
MemberRon_UK16-Nov-20 6:40 
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
Gerry Schmitz16-Nov-20 8:13
mveGerry Schmitz16-Nov-20 8:13 
QuestionHow to make a dll library? Pin
Alex Dunlop16-Nov-20 1:22
MemberAlex Dunlop16-Nov-20 1:22 
AnswerRe: How to make a dll library? Pin
Richard MacCutchan16-Nov-20 1:44
mveRichard MacCutchan16-Nov-20 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.