This question already has an answer here:
How do I add a label to wxWidgets wxBitmapButton?
(1 answer)
Closed 9 years ago.
How do I create a bitmap button with attached text label in wxpyython. I have not come across any such generic buttons till now. I believe I will have to create one myself. How do I do it?
Thanks in advance
Look at the wx.lib.buttons module for various flavors of generic buttons.
Also, in the 2.9 release series the stock button class (wx.Button) can have a bitmap + text label.
Related
This question already has answers here:
Can I detect if a window is partly hidden?
(2 answers)
How to determine if any part of the window is visible to Screen?
(1 answer)
How to get only the visible part of a window (Windows, gdi32, user32, etc)
(2 answers)
Closed 8 months ago.
I want to get a window's clip box so I can detect if the whole window is displayed.
package: win32gui
I know that IsWindowVisible() from the Windows API will return true if a window is NOT minimized, but it won't detect if the window is hidden behind other windows.
I also know that in C++, I could use GetWindowDC(); GetClipBox(); ReleaseDC(); to get a RECT struct with the coordinates of the smallest bounding rectangle of the window (I got this from another post on StackOverflow, but I haven't tested it).
In Python, I can use:
# That just returns a window by the title
handle = getWindowByTitle("Skype") # "Skype" is just an example
winDC = win32gui.GetWindowDC(handle)
# this function doesn't seem to exist/be implemented in win32gui
win32gui.GetClipBox(winDC, '''This also needs a RECT struct''')
win32gui.ReleaseDC(winDC)
How can I use GetClipBox() in Python? Or, is there any other way to check it?
I would like to not use any other package, because I want my app to have as few dependencies as possible.
I have also heard of ctypes, but I have never used them. I am not sure how it works, and/or if it can help here.
This question already has answers here:
PyQT QPushButton.setMenu? How to make it work?
(1 answer)
Qt: Drop-down button?
(8 answers)
Closed 9 months ago.
In my application, I don't want to clutter the screen with too many buttons, so I want to add multiple actions to one button. Even thought I could accomplish it through things like double clicking or modifier keys, those solutions are in no way intuitive for the user. I want to have a button that has an additional dropdown menu, which can be used to change the action of the button. To illustrate, here is a rough sketch of what that would look like:
Is this possible PyQt5 or PySide6? Thank you for your help.
This question already has an answer here:
Set default caret position inside entry widget in Tkinter Python
(1 answer)
Closed 3 years ago.
My GUI is structured such that I have a main class, and each page of my GUI, of which I can navigate between, is instantiated whenever I call it. One of my pages has an entry box, but i have to manually move my cursor and select the entry box to begin typing. Is there a way for the entry box to automatically be selected when I call that page?
Seems like an interesting problem
You should use focus().
For Example, if your entry widget is e. Then use e.focus().
This question already has answers here:
Load whole *ui file in an frame/widget of another *.ui file
(1 answer)
PyQt: How to switch widgets in QStackedWidget
(5 answers)
Creating a custom widget in PyQT5
(2 answers)
Closed 3 years ago.
I am making a simple app and was wondering what the standard is for multiple windows when using Qt Designer and python.
I need to be able to have functional back and next buttons which will take me to the previous screen like in simple .exe installers.
I do not want to use the tab widget.
I have tried using the stacked widget but when using layouts on my first screen it gets inserted into the grid layout.
This question already has an answer here:
PyGObject and glade send window to the front
(1 answer)
Closed 8 years ago.
I am currently building an application with python 2.7 with Gtk3+.
I want to open a window on top of another window. If the second window is visible, the parent one should not be clickable.
So the behaviour should be the same like opening a dialog window.
What is the best way to achieve this?
You need to use the property window.set_transient_for(parent_window)
This post may help you if you are using glade.