5
[c#] Refer to panel class? (WARNING EXTREME NOOB)
Post Body
Hi all,
I am very very new to C# and am trying to create a simple gui for my employer that will have several overlapping panels that are made visible and enabled based on the selection of a combobox. In the switch to see which item is selected in the combobox I can manually turn off each panel and turn on the correct one, but instead I'd like to create, in other programming languages, a reference or pointer to a specific panel called CurrentPanel.
switch(ProcessCombo.Text) {
case "Rectify":
Panel CurrentPanel = RectifyPanel;
CurrentPanel.Visible = true;
CurrentPanel.Enabled = true;
break;
}
Something like that, where RectifyPanel's visible and enabled properties are set to true through reference. How do you do this in c#?
Author
Account Strength
100%
Account Age
15 years
Verified Email
Yes
Verified Flair
No
Total Karma
20,733
Link Karma
1,874
Comment Karma
18,389
Profile updated: 5 days ago
Posts updated: 10 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 13 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnprogra...