Horizontal Scrollbar

52 views
Skip to first unread message

Stefano Gardini

unread,
Feb 16, 2016, 10:27:52 AM2/16/16
to Eto.Forms
We need to add to my custom control only horizontal scrollbar. I don't see a scrollbar widget (or similar). How I can do it?
Scrollable widget seems too complex for my purpose and not really suitable.

Thanks

Emg. Stefano Gardini

curtis

unread,
Feb 17, 2016, 11:21:31 AM2/17/16
to Eto.Forms
Hi,

There is unfortunately no way to add a scroll bar without using the Scrollable control.

You can set the height of the content of the scrollable to something small, so that it does not scroll vertically even if your content is sized larger:

var myContent = new Drawable { Size = new Size(400, 400) }; // or whatever control you want to show in the scrolled region
var scrollable = new Scrollable { Size = new Size(200, 200), Content = new Panel { Height = 1, Content = myContent } };

Hope this helps!
Curtis.

Stefano Gardini

unread,
Feb 18, 2016, 11:12:53 AM2/18/16
to Eto.Forms
Hi Curtis,
I used your suggestion and (with more complexity) I have solved my problem. 

Thanks and have a nice day.

Stefano
Reply all
Reply to author
Forward
0 new messages