问题描述
Hello CP,
我目前正在编写一个自定义控件,它继承自抽象ListControl(ListBox的父级)。现在我只想显示滚动条我不知道怎么做而不继承ScrollableControl。
那么,如何在不使用的情况下添加滚动条ScrollableControl?
Hello CP,
I''m currently in the process of writing a custom control which inherits from the abstract ListControl (the parent of ListBox). Now I''d like to display scrollbars only I don''t know how to do it without inheriting from ScrollableControl.
So, how do I add scrollbars without using ScrollableControl?
推荐答案
protected virtual CreateParams CreateParams
{
get {...}
}
然后你可以根据需要修改样式
WS_HSCROLL有一个值0x00100000L
WS_VSCROLL的值为0x00200000L
[]
祝你好运
Espen Harlinn
You can then modify the Style as needed
WS_HSCROLL has a value of 0x00100000L
WS_VSCROLL has a value of 0x00200000L
Window Styles[^]
Best regards
Espen Harlinn
这篇关于没有ScrollableControl的滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!