What is the wxPython Equivalent to Tkinter's Tk.iconbitmap? - user-interface

So I'm learning wxPython and am converting an application I wrote in python + Tk to wxPython. I'm new to the framework and have just read the getting started page on the wxPython site. I'm wondering if anyone knows off-hand the wxPython equivalent for Tk.iconbitmap so that I can put a small image on the corner of the main window?

That would be wx.Icon.
You can use wx.TopLevelWindow.SetIcon() to apply one to your main window.

Related

GUI's that support screenreaders?

I'm creating an application that helps to teach coding to the visually impaired. I started off with Tkinter in Python, however, I learned that TKinter does not support VoiceOver (Mac VoiceOver doesn't read the text inside the GUI).
Does anyone know a module that does support VoiceOver?
First I'm a blind programmer,
if you want your app to be accessible for every screen reader you have to use WXpython. it's open sorce lib
https://wiki.wxpython.org/Getting%20Started#Getting_started_with_wxPython

wxpython -- a frame or panel similar to labelframe in ttk?

I used ttk's labelframes for many different things and have recently switched over to wxpython. I can't, for the life of me, find a similar panel or frame in wxpython. Does anyone know of any? I'd prefer it be native but if it isn't there, it isn't there. Thanks.
You mean something like that? wxPython StaticBox? Will act together with STaticBoxSizer as container for other controls.

Simple GUI library for basic GLUT CAD application?

I want to create a very simple CAD application written with GLUT library. I just need this to create simple dice editor application for computer graphics class, so an easy-to-use GUI library that supported GLUT is what I basically need for this project. I stumble upon GLUI, but it doesn't have widgets such as color chooser or file loader dialog. Is there a suitable GUI library for GLUT that I can use?
There are gui libraries like Qt or FLKT, but they have their own main loop.
on windows you should call directly the native files dialogs GetOpenFileName() and GetSaveFileName(). If you want a cross platform solution and to exactly answer the question, yes there is "a suitable GUI library for GLUT that (you) can use": look for tiny file dialogs on sourceforge it even has a color chooser and has no main loop.
You want a simple GUI library yet you want it to have advanced features.
Open File Dialog
Depending on what OS you want it to be running on you can pop up the OS specific file opening dialog. It does not have to be shown inside of the application window. Instead let it pop a new window with the OS file open dialog.
Color Chooser
Implementation of a simple Color Picker widget is not that hard really. Three sliders for RGB and a box to show the color chosen.
You can also use the OS (Windows) specific color picker. And skip the implementation inside you app altogether.

OSX-like toolbar in window chrome?

Many OS X apps use some sort of iconized-tabs in the chrome of the menubar for their preference dialogs. For an wxPython app I would like to create such a preference dialog. Dropbox appears to be using wxPython (see also screenshot), so how would I create such a dialog myself?
Update: After fiddling with wx.Frame.CreateToolBar, the frame begins to resemble the original. However, the style of the radio button (which I probably need for a wx.Notebook) is not what it should be. See also the gradient and borders of the 'General' tab in the image above. (source code)
Dropbox doesn't use wx I'm pretty sure, but you can get this native toolbar with wx. You have to use ctypes and load in some core and carbon frameworks.
There is an article in the wx wiki on how to do it
I think what you want is a custom wx.Dialog with a wx.Toolbook in it. See the wxPython demo package for an example or you can read my tutorial: http://www.blog.pythonlibrary.org/2009/12/03/the-book-controls-of-wxpython-part-1-of-2/3/
UPDATE: I'm not sure if this still applies, but there is a wiki entry on something that sounds a lot like what the OP wants: http://wiki.wxpython.org/NativeMacOSXToolbarSelection

Creating white fade in and out between QT Movies for Cocoa App

I'm trying to achieve a certain effect in Cocoa application. I have several QT movies and a window with buttons that each link to a different movie, and play that movie in the main window. Pretty simple. The problem is I'd like to have a white fade come in and out (more of a flash, really) when the main window switches movies. I'm stuck on how to proceed. I noticed that there is a library for Cocoa called Core Image which can supposedly be used to create visual effects for movies, but is that the best way to proceed? Or is there a simpler way in the QTKit? Thank you!
Actually I just figured this out. I can adjust the alpha levels--> Change Alpha on Main Window - Cocoa

Resources