Not able to display a treeview window - python

I'm trying to open a treeview window by clicking a button but it isn't working
[Code](https://i.stack.imgur.com/TorXR.png)

Move next_cmd() function inside buyerprop() function.

Related

Kivy Button within Button

Is there a way to place a button inside of an existing button in Kivy? I am trying to create a library of videos (as buttons that open a popup when pressed) that each have the option to delete the video/widget when an 'x' is pressed in the top corner. I am wondering if there is a way to stack buttons on top of each other or place on button inside of another?
You can use FloatLayout and adjust the pos_hint to place the buttons at your desired location.
You can read about it on the link below.
https://kivy.org/doc/stable/api-kivy.uix.floatlayout.html

How to get the position of a gui in Tkinter

I'm creating a second gui when I click a button and am then destroying my original gui.
I would like to create this new gui in the same position as the original gui.
Is there a function that will let me get the geometry or position of the original gui before I destroy it?
Call the geometry method of any root or toplevel window. It will return a string of the form "widthxheight+x+y".

Changing Tkinter Screen when button is clicked?

I am aiming to change the a part of the Tkinter screen when a button is clicked. Do I have to destroy the screen then redraw it (to create the illusion that only a part is being changed?) Or can I keep the button there and somehow only change one part (like the graphics.) Thanks!
No, you do not have to destroy the screen and redraw it. You can easily insert widgets into the current window when a button is clicked. There's nothing special about being run from a button click -- the code is the same as your initialization code.

'hover over' popup with Tkinter

I have implemented an informational popup in a python app using a Tkinter Menu widget. I have a Text widget on a canvas in the root window. I created a Menu widget that has root as its parent. When I detect a mouse hover over the text widget I post the popup menu with menuWidget.post(). When I get a leave event from the text widget my intention was to have the popup disappear by calling menuWidget.unpost(), only the popup menu does not disappear until I click elsewhere outside the text widget.
First, is this a sane method for implementing an informational popup? And can anyone tell me why the popup menu won't disappear?
This is not the right way to do an informational popup. On the Mac and on windows machines menus are native controls. Because of this the unpost command doesn't work because tk cedes control to the system event loop in order to get platform-specific behavior.
What you want is to use instead is a toplevel window with the overrideredirect flag set. This lets you display a borderless window anywhere you want. The upside to this is that you aren't limited to simple text -- you can put anything you want in that toplevel -- another text widget, a canvas, buttons, etc.

Getting a result from a modal window in pygtk

I need to open a new window from my applications main window. This new window need to be
modal, I need to be able to get a result from the modal window based on user interaction with it.
I have figured out how to make the window modal. But I can't figure out how to return a result from the modal window and pass it back to the main window when user close the modal window.
You probably want to make your window a gtk.Dialog and launch it via the run() method. This is designed to do exactly what you are looking for.
See pygtk docs for gtk.Dialog.run

Categories