[RESOLVED] which method we use to enable disable buttons of toolbar in c sharp
we use this method in vb 6.0 for enable disable
Toolbar1.Buttons(1).Enabled = false
which method we use to enable disable buttons of toolbar in c sharp
in switch statemnt we write
switch (index)
{
case 4 && RecMode != "":
}
system generate error please correct this sentax
Re: which method we use to enable disable buttons of toolbar in c sharp
- Enable/disable buttons: it's nearly the same,
only the buttons collections starts numbering from 0.
So, using C# syntax:
Code:
Toolbar1.Buttons[0].Enabled = false;
- The switch : that syntax is not accepted. Look at the switch keyword in the MSDN library.
You will have to use 'if'.
Code:
if(index == 4 && RecMode != "")
{
}