Skip to content
Advertisement

Tag: grid

Python: Expand 2D array to multiple 1D arrays

Consider the followoing example from np.meshgrid docs: In my application, instead of x and y, I’ve 25 variables. To create a grid out of the 25 variables, one way would be: However, the code will look ugly and not modular w.r.t. the number of variables (since each variable is hard-coded). Therefore, I am interested in something like the following: However,

I can’t scroll grids in frames in canvas (tkinter)

I am using Tkinter for a project, and I found in Stackoverflow a code to create a scrollbar, which I understood well. I wanted to scroll some buttons, which worked, but now when I try to scroll some grids (button and scales), it doesn’t work. I have tried to manage my code with answers here and here, but I didn’t

python pack() and grid() methods together

Im new to python so please forgive my Noob-ness. Im trying to create a status bar at the bottom of my app window, but it seems every time I use the pack() and grid() methods together in the same file, the main app window doesn’t open. When I comment out the line that says statusbar.pack(side = BOTTOM, fill = X)

Displaying Matplotlib Navigation Toolbar in Tkinter via grid

I’m developing a small Tkinter GUI to draw matplotlib-plots. (It contains a few Entries and assembles the plot according to their content.) I have designed my plotting widget according to http://matplotlib.org/examples/user_interfaces/embedding_in_tk.html, only I use grid instead of pack: That part works. But embedding the NavigationToolbar in the same fashion does not. Tkinter breaks down without error when I include the

Advertisement