问题描述
在 TabControl 中,如果选项卡不多,则面板中选项卡的右侧可能会有空位.当用户在这个空白区域双击时,我想处理此事件以创建一个新选项卡.如何实现这一目标?
In a TabControl there can be empty place to the right from tabs in the panel if there are not too many tabs. When a user doubleclicks in this empty space I'd like to process this event to create a new tab. How to achieve this?
推荐答案
这听起来不像是对应用程序用户来说直观的 UI 概念.为什么不添加一个标记为+"的小附加选项卡.当用户单击该选项卡时,会添加完整的选项卡.Firefox 就是这样做的,从一开始就对我来说很直观.
This doesn't sound like a UI concept that's intuitive to the users of your application. Why don't you add a small additional tab labelled "+". When the user clicks on that tab, the full tab is added. Firefox does it that why and it was intuitive to me from the first second.
(抱歉没有回答您的双击问题.)
(Sorry for not answering your double click question.)
这篇关于如何处理双击 TabControl 的选项卡面板的空白区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!