Ever since Internet Explorer 7 I have been receiving requests for adding ButtonSpecs to each individual KryptonPage within the KryptonNavigator. You could use this to add a close button to each page so it mimics the IE7 way of working.

Because the button spec collection is provided on a per-page basis you do not have to provide exactly the same button spec for every page, you can have different sets of buttons per-page. Here I have added a drop down button spec to the first page, a close button to the second and a couple of navigation buttons to the fourth.

As with all button specs you can specify tool tip information as shown in the above picture. You can also assign a KryptonContextMenu to the button spec so that clicking causes a popup menu thus…

Of course, the ability works not just for the default tab headers mode. Here you can see one of the CheckButton modes…

Even the Outlook Full mode will show buttons as specified.

Now that the KryptonMonthCalendar and KryptonDateTimePicker controls are finished I am working on a few minor enhancements like the one here before I make release a beta version. I expect it to be about a week from now when that gets released into the wild.

8 Responses to “Per-Page ButtonSpecs”

  1. Stefan Koell Says:

    Hi Phil,
    this is a great enhancement to the navigator!

    Do you also provide a simple way (like a boolean on the navigator) to show those buttonspecs only for the active tab? This would make the control perfect. Sometimes you only want to show those close buttons for the currently active tab page and not for all. Makes sense when you have a lot of tabs and the button specs are eating all the space for the text.

    Can’t wait for the release. Great work!
    cheers

  2. Waescher Says:

    Great extension! Can’t wait to try the beta :)

  3. Tran Ngoc Van Says:

    Great news!

  4. Chris Says:

    Looking great as always. Any chance we could get a SelectedPageChanging event with an e.Cancel argument in the EventArgs? I think this would provide a much needed level of additional control over how the pages change. For the EventArgs, look at the Validating/Validated event of a SWF input control.

  5. Matt Says:

    And in the trend of asking for more and more. In addition to providing each individual page with a button spec collection, could you provide the control with a common button spec collection? So like with the close button, you could specify it once in the control’s collection and it gets replicated for each page automatically? Then maybe a property on each page that says whether it displays the common button specs.

  6. Judah Says:

    Excellent, Phil. We’ve long wanted this functionality. One other bit of functionality we’d like is dragging the tabs to re-order them. But this is a step in the right direction. Nice job.

  7. Chris Says:

    In response to my own post above, I just found the Deselecting/Selecting/Deselected/Selected events for Navigator/Pages when the selection is changed. I think it would be nice to have something at the Navigator level to stop the selection process, but grabbing it at the page and stopping it there should be good enough.

  8. David35 Says:

    FANTASTIC!

Leave a Reply