Click here to Skip to main content
15,881,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 5:36
Ron_UK16-Nov-20 5:36 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 5:48
mveOriginalGriff16-Nov-20 5:48 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 5:58
Ron_UK16-Nov-20 5:58 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 5:19
Ron_UK16-Nov-20 5:19 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 5:27
mveOriginalGriff16-Nov-20 5:27 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 8:39
Ron_UK16-Nov-20 8:39 
GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
OriginalGriff16-Nov-20 9:29
mveOriginalGriff16-Nov-20 9:29 
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
Luc Pattyn16-Nov-20 5:30
sitebuilderLuc Pattyn16-Nov-20 5:30 
And if you're really lucky there is an extremely simple approach that takes only a single line of code:
let's assume you have say 9 textboxes and 9 labels telling what the textboxes are for; let's hope they are all organized in two columns, so all neatly atop each other.

Now add a Panel to your Form, covering all the space where you want the labels to go, but not covering anything else (that is where you need to be lucky). Now put the labels on the Panel, not on the Form itself. You can now make all labels (in)visible by changing the visibility of the Panel! And that takes a single line of code...

Smile | :)
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...

GeneralRe: Changing the properties of multiple labels in some kind of loop? Pin
Ron_UK16-Nov-20 5:40
Ron_UK16-Nov-20 5:40 
AnswerRe: Changing the properties of multiple labels in some kind of loop? Pin
Gerry Schmitz16-Nov-20 7:13
mveGerry Schmitz16-Nov-20 7:13 
QuestionHow to make a dll library? Pin
Alex Dunlop16-Nov-20 0:22
Alex Dunlop16-Nov-20 0:22 
AnswerRe: How to make a dll library? Pin
Richard MacCutchan16-Nov-20 0:44
mveRichard MacCutchan16-Nov-20 0:44 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 0:47
Alex Dunlop16-Nov-20 0:47 
GeneralRe: How to make a dll library? Pin
Richard MacCutchan16-Nov-20 0:51
mveRichard MacCutchan16-Nov-20 0:51 
AnswerRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 0:50
mveOriginalGriff16-Nov-20 0:50 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 1:51
Alex Dunlop16-Nov-20 1:51 
GeneralRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 2:17
mveOriginalGriff16-Nov-20 2:17 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 2:25
Alex Dunlop16-Nov-20 2:25 
GeneralRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 2:41
mveOriginalGriff16-Nov-20 2:41 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 2:48
Alex Dunlop16-Nov-20 2:48 
GeneralRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 2:50
mveOriginalGriff16-Nov-20 2:50 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 3:09
Alex Dunlop16-Nov-20 3:09 
GeneralRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 3:40
mveOriginalGriff16-Nov-20 3:40 
GeneralRe: How to make a dll library? Pin
Alex Dunlop16-Nov-20 4:15
Alex Dunlop16-Nov-20 4:15 
GeneralRe: How to make a dll library? Pin
OriginalGriff16-Nov-20 4:37
mveOriginalGriff16-Nov-20 4:37 

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.