TabControl与水平滚动条 [英] TabControl with Horizontal Scrollbar

查看:759
本文介绍了TabControl与水平滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在winForm上有一个制表符控件,并在运行时动态添加tabPgs。一旦标签超出表单上的空格,如何为标签控件底部的水平滚动条启用或添加(代码)?我知道选项卡控件将显示/添加滚动按钮,但我需要一个滚动条。



任何帮助将不胜感激。



提前致谢。



-DA

Have a tab control on a winForm and tabPgs are dynamically added at runtime. How do I enable or add (code) for horizontal scrollbar at the bottom of tab control once tabs reach beyond the space on my form? I know that the tab control will display/add the "scroll buttons" but I need a scrollbar.

Any help would be appreciated.

Thanks in advance.

-DA

推荐答案

解决方法:在表单中添加
Workaround: Add an
HScrollBar

。添加新页面时设置

TabControl.Maximun = TabControl.TabCount

。最后在

HScrollBar_Scroll

事件中,设置

TabControl.SelectedIndex = HScrollBar.Value

。你的,Rodolfo。

. Yours, Rodolfo.


这篇关于TabControl与水平滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆