Enabling/Disable ToopStrip Buttons

Hi All,

I was browsing for an answer prior to posting this question. Here is my question...

I created a windows form with menu and toolstrip buttons. After I launched a MDI form f, I would like to enable or disable the navigation keys when the form load. How do I achieve this scenario

toolstrip_navi -> consists of the following buttons

first_toolstripbutton

prev_toolstripbutton

next_toolstripbutton

last_toolstripbutton

TIA




Answer this question

Enabling/Disable ToopStrip Buttons

  • Eric J. Johnson

    you should create an event in your main.cs, declare a global variable, if the value of that global var changes then that's your event.. maybe you should read more on classes, properties and events. here you'll learn how to create your own event, declare global vars, properties and classes.

  • Deadlock42440

    Hi,

    I think I figured it out why I can't control the button. I am trying to enable the toolstrip button that does not exist in the current form. I was hoping to create several toopstrip buttons on parent mdi form called main.cs and when I click on the first_toolstripbutton of toolstrip_navi. It will call the current method/event of the current active form to move to the first record. Is there a solution for it

    TIA



  • BobGun

    you want to disable them after you close the mdi child form or after loading the mdi parent you can disable or enable them by using the .enabled property, ex. this.first_toolstripbutton.enabled = true; you just need to place them in the right event.



  • Enabling/Disable ToopStrip Buttons