Skip to content

How do i change the orientation of a widget? #1581

Discussion options

You must be logged in to vote

Right now, there's no cross-platform API for a vertical slider.

Toga has precedent for having vertical/horizontal control in APIs - the Divider widget is probably the easiest example of this - and it looks like Cocoa and Winforms both have direction control exposed on their slider widget APIs. If you're up for a FLOSS contribution challenge, I wouldn't be opposed to a PR that adds direction control to the Slider widget.

In the immediate term, you can use the GTK API directly - if your app code contains a slider widget myslider, myslider._impl.native will be the native Gtk.Scale widget, so you could invoke my slider._impl.native.set_orientation(Gtk.Orientation.VERTICAL). This obviously won…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@JamesClarke7283
Comment options

@freakboy3742
Comment options

@JamesClarke7283
Comment options

Answer selected by JamesClarke7283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants