How do I disable the horizontal scrollbar in a Panel

前端 未结 11 1917
别那么骄傲
别那么骄傲 2020-12-01 12:13

I have a panel (Windows Forms) and I want to disable a panels horizontal scrollbar. I tried this:

HorizontalScroll.Enabled = false;

But tha

11条回答
  •  一生所求
    2020-12-01 12:54

    I was having this same type of issue with the horizontal scroll appearing when AutoScroll=true, it only showed up when the vertical scrollbar appeared. I finally figured out that I removed padding from the panel and by adding 20 back to the right padding it allowed the vertical scrollbar to appear and not show the horizontal one.

提交回复
热议问题