Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i got started with python tkinter. but could barely get a scrollbar to work. so i figured this cant be the best gui there is. what are some options with the most features?

What I have tried:

i got started with python tkinter.
Posted
Updated 20-Jun-19 19:59pm

1 solution

I'd start with a .NET language: .NET (in one form or another) is now available for Windows, Web, Linux, Android, iOS, ...

I'd suggest start with C# / WinForms where it's easy to create a scrollbar in code (though it's even easier to create one in the designer):
VScrollBar sb = new VScrollBar();
sb.Dock = DockStyle.Right;
Controls.Add(sb);
sb.Scroll += Sb_Scroll;
The four lines are all you need:
1) Create a vertical scroll bar instance.
2) Set it to "hug" the right hand side of the container (Form, Panel, UserControl, whatever)
3) Add the scrollbar to the container
4) Add a handler so that you can do something when it scrolls.

All you have to do now, is decide what the scroll bar should do and write code in teh handler method.

And most of the time, you don't have to do that: containers "know" when they need a scrollbar and add it themselves so you don't have to!
 
Share this answer
 
Comments
Maciej Los 21-Jun-19 4:07am    
5ed!

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