在管理的TabControl设置标签控件的样式控件、样式、标签、TabControl

2023-09-06 14:22:14 作者:月亮是我撸弯的

是否可以设置一个选项卡控件样式如 TSC_BUTTONS 上有管理的TabControl?

Is it possible to set a tab control style like TSC_BUTTONS on a managed TabControl?

的Windows CE 6 / .NET CF 3.5

Windows CE 6 / .NET CF 3.5

推荐答案

需要提醒的是,我不是专门做这种风格的变化(虽然我已经做了很多其他人的),根据文档的 TCS_BUTTONS是一个支持的样式。由于管理TabControl的仅仅是围绕当地一个包装,你应该能够为P / Invoke的SetWindowLong函数与GWL_STYLE和调整这个(可能在一个TabControl的衍生自定义控件的构造函数)。

With the caveat that I'm not specifically done this style change (though I've done plenty of others), according to the docs TCS_BUTTONS is a supported style. Since the managed TabControl is simply a wrapper around the native one, you should be able to P/Invoke SetWindowLong with GWL_STYLE and adjust this (probably in the constructor of a TabControl-derived custom control).