Controls on the ToolStrip exists in the Control collection of the
ToolStrip and not the underlying form.
you can access the controls on the tool strip from it's Items property.
The buttons(& other controls) on these tool strip exist as a member of
the underlying form but are not in it's control collection.
If you are calling this static method before any instance of the class
is being created, its better to create some static fields in the same
class which will indicate which buttons to enable/disable. Now on the
form load event check these fields and enable/disable the buttons
accordingly. To enable/disable the buttons you don't have to worry about
the last two statements above.
Thanks & Regards,
Ashutosh Bhawasinka
daveL wrote:
Hi
I have a Toolstrip on a Window with 5 buttons
i want to send this to a application static fucnction
to enable / disable the buttons based on User rights
When i send Window.controls to the method
buttons dont exists in the Controls Collection
When i work with the Toolstrip i can't see any controls
how to see the controls attatched to the Toolstrip
Thanks
DaveL