wxPython: Highlight item in GidSizer upon mouse click - python

I have a Panel with a bunch of pictures placed on it in a GridSizer layout. How can I draw a highlighted color around the edge of an image or its border to show that it has been selected upon a mouse click event?

Take a look at the Widget Inspection Tool's code. It can highlight any widget. On my machine, it's in the "_InspectionHighlighter" class in the inspection.py file, which is here: C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\lib
You can read about the tool here: http://wiki.wxpython.org/Widget%20Inspection%20Tool

You could put each picture in a panel, and use SetBackgroundColour()to set the background color of the panel.

Related

Maya Python: Get the Widget containing the renderd image from Mayas Render View

I am trying to make an experimental tool that modifies the existing Maya Render View and swaps out the current rendered Image. I want to get the widget that contains the rendered image and change it.
I got the Render View Dialog through MQtUtil with this code:
I looked through all children of the Render View and tracked the widget that seems to contain the rendered image down to a QWidget. The problem ist that this widget has no children and there is no QImage or a similar widget that actualy displays the rendering.
I also removed all of the widgets in the dialog that wont remove the rendered image to make sure I dont miss anything.
These are the widgets that are left in the dialog:
 
I also have a tool that prints the hirarchy of the widgets when hovering over it. When I hover over the renderd image I get this hirarchy. The widget at the top that has no Object name set is the widget that seems to contain the rendered image
 
Am I missing something or how can I get the widget that displays the rendered image?

Does kivy have the capability to create a scrollable grid of menus with text and icons, as in the image below, if yes, how?

I want to create a dictionary, like the one in the image, where I can translate English to my native language. I have achieved the navigation drawer, but the challenge is how to create a scrollable home screen menu, as in the image. Pls, any idea how I can go about it?

Get data from tooltip with Python

If I use an application on windows and I hover mouse over an icon appear a little yellow rectangle. (tooltip maybe) How can I extract data from that?

Tkinter: Use different font (color, size, etc.) for the text within the same button?

I have a very specific question.
I have a tkinter button. Each time I click it I get a pop-up window with an Entry box. Enter a text and press enter I can change the text of this button. I can do it as many time as the as I want.
Now the question is:
can I make the button text to have different color and font size?
Say the original button text is "btn 1". The first time I click it. The text becomes "btn 1\nFirstClick". The second time the text is ""btn 1\nFirstClick\nSecondClick".
I have all the code worked out as I wanted. But now I want "FirstClick" to be in Red and "SecondClick" to be in Green".
Is that possible? I googled and can't find the answer.
You cannot use multiple fonts or colors in a single button. Your only option would be to create a custom widget that looks and behaves like a button, but which is implemented with a Text or Canvas widget. Those two widgets allow you to use multiple colors and fonts at the same time.

How to make height of Gtk.StatusBar smaller in PyGObject (GTK+3)?

Standart StatusBar image
<-- So, here it how it looks in my application now. How can I make the height of it smaller? For e.g. in Google Chrome when you pointing some link it shows in the grey bar at the bottom of the page, I want same size.
Chrome is not using a GtkStatusBar (or any other GTK widgets, for that matter).
If you want to change the appearance of a GTK widgets, you'll have to either tweak the theme or use a custom widget, with your own sizing policy.

Categories

Resources