Yes I'm quite noobish I've been learning C# by myself reading various material I can scrounge online but I've run into a small issue while trying to write a small program.
I'm simply trying to use a menuitem as a toggle between various instructions. The basic idea is simply to make text visible or invisible depending on the menuitem that's being clicked. I've solved the problem but the solution requires a lot of repetitive code and I'm trying to avoid that.
What I don't understand is why this piece of code isn't working
private void onImsToolStripMenuItem_CheckChanged(object sender, EventArgs e)
{
onImp1ToolStripMenuItem.Checked = false;
if (onImsToolStripMenuItem.Checked)
{
lblOnIms.Visible = true;
}
else
{
lblOnIms.Visible = false;
}
Essentialy, the problem is that it stays visible. Once I choose a seperate selection the label (lblOnIms) stays visible. I've worked around this by simply adding code lblOnIms.Visble = false; at the beginning of the checkedstate of the next item but that would require me to write that for every option in every menu and it's going to be a large menu so I see this as being extremely inpracticle and there must be a better way I just don't know it. anyone have any ideas what I'm doing wrong?
Thanks for any responses :) I knwo it's probably a pretty noobish question but it's like I said, I'm self taught so blame the teacher lol