Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enabling/Disable Toolstrip buttons
Message
From
03/03/2006 12:43:44
 
 
To
02/03/2006 23:50:00
General information
Forum:
ASP.NET
Category:
Web forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01101157
Message ID:
01101313
Views:
12
Steve,

That error message means that you're trying to access something that is not public. Try changing the modifier of the buttons to public ... they are probably private or protected. You can do this either in code or from the Property Sheet.

~~Bonnie

P.S. ... you posted a WinForm question in the WebForm category ... this is ok for a first time user to the forum. <g>



>Hi All,
>
>First time using the forum and first time attempting to code in C#. Here is my first question. I created a windows form called Main.cs with toolStrip_navi which consists of 4 buttons (first_ToolStripButton,prev_ToolStripButton,next_ToolStripButton, and last_ToolStripButton). From the menu, I clicked on item called Wizard to run a Wizard.cs form. In the Wizard_Load(object sender, EventArgs e) event I want to turn off(disable) the next_ToolStripButton, and last_ToolStripButton. How could I do that? I tried the following code, but ended up with error message.
>
>Main.first_ToolStripButton.enabled = false;
>
>
>'MyApp.Main.next_ToolStripButton' is inaccessible due to its protection level C:\Documents and Settings\Steve\My Documents\Visual Studio 2005 \Projects\MyApp\New_Reports\Wizard.cs'
>
>TIA,
>Steve
>
>P.S. Wizard.cs is inherited from a base form that I created.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform