Click here to Skip to main content
15,920,383 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i crate one custom control inheriting the flow layout panel.on that control i added buttons.and set the autoscroll =true,but i want to disable the bottom(horizontal)scroll bar.how to do this?
Posted

1 solution

Hi,

you can do the following:

C#
// need to disable AutoScroll, otherwise disabling the horizontal scrollbar doesn't work
flowLayoutPanel.AutoScroll = false;

// disable horizontal scrollbar
flowLayoutPanel.HorizontalScroll.Enabled = false;

// restore AutoScroll
flowLayoutPanel.AutoScroll = true;


Hope this helps,

Thomas.
 
Share this answer
 
Comments
Neelendu Kumar 2-Apr-13 8:31am    
thanks for solution..
Neelendu Kumar 2-Apr-13 8:32am    
now it is working.
Bernhard Grüger 20-Jul-21 4:43am    
Thanks for this, very helpful!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900