How to create a rounded scrollbar with style in tkinter python - python

I'm looking for how to create a rounded scrollbar with style method in tkinter.
Also, is it possible to set trough color when our mouse enter scrollbar trough?
This is a example about the scrollbar which I'm taking about.
https://i.stack.imgur.com/OHpm7.jpg
Thanks in advance for your helps!

Related

Grouping multiple buttons with absolute positioning in a layout

Is it possible to group buttons that are arbitrarily positionned with PyQt ?
There is the context :
I would like to code a visual programm to control a research system with specific geometry, through Python.
I expect this kind of result :
In this program, the buttons of "buttons group 3" are positionned is a specific geometry that does not fit in a grid. Those buttons are clickable and a click on them change their color.
I would like those buttons to be grouped together, in something like a layout, because it seems to be that it is coherent in order to change positions and sizes of layouts and window if needed.
I'm coding that with PYQT5,... but I cannot figure in PyQt5 how to code this group of buttons with specific geometry ?
Is it possible to group buttons that are arbitrarily positionned with PyQt ?
Thanks in advance for your advice, I feel I'm missing something in PyQt concept.

Tkinter Python: Bar Gauge?

I am trying to find an effective way to create a bar gauge in Tkinter. I've been using labels inside a frame and changing the background color to indicate the level, but this is extremely inefficient as it involves ten if statements, each with ten lines of code, for each gauge. Would anyone be kind enough to point me in the right direction for how to do this?
Thanks in advance.
from the sounds of it you are simple after a progressbar, there are two such widgets in tkinter, one is part of ttk and the other is tix, they function much the same but the styling is different, and both of them can be linked to an IntVar and simply setting the value of the IntVar sets the progressbar.
1) ttk.Progressbar
see here
2) tix.Meter
see here

wxPython: Placement of scrollbar in ScrolledPanel

I was wondering if there is any way to control the location of the scrollbar from a scrolledpanel? More specifically: I use a horizontally scrolled panel and it would be nice if the scrollbar was on top of the panel (instead of bottom) and would only span 80% of the horizontal distance.
Is something like this possible?
Thanks...

Python Plotting and displaying multiple objects in same GUI window

I have a 2 part question:
what is the best method for plotting data in Python? I only need to plot data in 2d.
I have a canvas GUI that I built using Tkinter's canvas function. It draws an 8x8 grid of rectangles and also has some code to allow you to scroll the window. (I've attached a picture).
Is it possible to include a plot in the same window as this canvas object? I need to be able to display plotted data and hopefully add buttons to my GUI that will allow me to update the plot during the run of the GUI.
Thanks in advance!
Matplotlib is the de-facto way to plot data with Python. It's really wonderful. It can also be embedded in Tk.

Matplotlib zooming work in conjunction with wxPython ScrolledWindow

I've got a Matplotlib canvas (FigureCanvasWxAgg) that I'm displaying inside of a wx.ScrolledWindow. The problem is that I'd like to have the default zooming and panning functionality of Matplotlib work in conjunction with the ScrolledWindow, so that when the user zooms the image within the canvas, the ScrolledWindow should become larger to accommodate for the zooming (scrollbars become smaller). Similarly for panning, I'd like the default matplotlib panning tool to work in conjunction with our ScrolledWindow, so that when the user pans the image on the canvas, the ScrolledWindow's scrollbars should move accordingly.
I've been searching for a while now and have not seen anyone even mention if this is possible. Could anyone point me in the right direction?
Thank you for any help/tips.
The problem is that the default Zoom and Pan don't resize the figure, they just change the limits and redraw the plot.
What you want is the Zoom to resize (keeping the same limits) and the Pan to work as in a normal Scrolled window. I have never tried this, fig.set_size_inches(w,h) should do the trick.

Categories