开发者

WinForms tab-control replacement that's usable with a large number of tabs

Our app has a tab control that shows a variable number of tabs. Most of the time, there are a handful of tabs, and the "tabbed" metaphor is simple and easy to use.

But on rare occasions (when working with certain types of data), we might need many more tabs than will fit across the screen. When that happens, the trusty tab control is no longer a good user experience. Whether you do multiple rows of tabs, or the little scroll buttons, finding the tab you want becomes a huge headache.

Visual Studio's editor can handle this situation with relative grace. It only shows a limited number of tabs at a time (however many will fit across the screen); and if you want something that's not currently visible, there's a dropdown button that shows the complete list. Are there any third-party WinForms tab controls that offer similar functionality -- a few tabs at a time, plus a dropdown?

There will actually be times when even the dropdown list would be too long to fit on the screen, so it would be helpful to know how any tab controls deal with that. A scrollbar (where you can drag the thumb quickly to the right neighborhood) would be great; so would incremental searching using the keyboard.

For purposes of this question, assume that replacing the tabs with some开发者_高级运维 other UI metaphor (e.g. a listbox down the left side) is not an option. (We are exploring that, but that's not what this question is about.)


Telerik have a commercial Winforms control library which has a control called RadPageView. This can behave similar to what you describe when in StripView mode. The library is costly just for this one control though.

DevExpress also have one as part of their XtraEditors library called XtraTabControl. This has an "Additional paint style emulating the Visual Studio 2005 tabbed interface", although there are no screen shots of what that looks like. There is a screen shot on this page, although it doesn't look like what you require.


Infragistics has a WinTab control that can be customized to do this. If you set ShowTabListButton to True, you get the dropdown button that shows a list of all the tabs; and if you set ScrollButtons to None and ShowPartialTab to False, it will only show as many tabs as will fit.

It's also very performant -- I can add 750 tabs in less than a second (as opposed to 6 seconds for the standard WinForms TabControl, and 43 seconds for the DevExpress XtraTabControl). It even supports content that's shared across all the pages, which happens to be something our app needs.

The only downside is, when you click the "tab list" dropdown, it shows the list in a dropdown menu. This menu doesn't support incremental searching with the keyboard; and if the menu is taller than will fit on the screen, there's no way to scroll quickly -- you just get "scroll up" and "scroll down" buttons, which scroll painfully slowly. So when the list is longer than will fit on the screen, this dropdown menu is just as unusable as scrolling horizontally through a long list of tabs.

On the other hand, there's a SpaceAfterTabs property, which lets you leave blank space to the right of the last tab. It would be possible to put a combo box, or some other sort of dropdown control, in that blank space, and roll your own, better-behaved overflow "menu".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜