Changing background color in easy gui - python-2.7

I did not find any useful link that talks about how to change the background color in easygui.
Is there a way to change the background color in EASY GUI ?

No, sorry, there is not way to set the background color.
At the moment, easygui has an easy interface, but is not as powerful as many users want. We hope to change that in the future and have added your question as an enhancement:
https://github.com/robertlugg/easygui/issues/49
In order to do what you want you should build your GUI using another framework. I would suggest Tkinter, not because its the for-sure best, but because it is also simple and fairly standard. You can look at the source code in easygui.py on how it was done previously, or search for 'tkinter' in your favorite Internet browser.

Related

Swiftui set boundaries for drag and drop, based on color

I am using the latest swiftui and would like to know if it is possible to create drag & drop boundaries based on color?
I already created a drag & drop with rotation, pinching, etc. But would like to be able to create regions where you can drop into.
Thanks
Yes it is! It's a great idea, and I think you should pursue it.
As it stands there's a hundred different ways to go about things. Spend some time thinking about how you would want it to work, then just take baby steps. You've already covered a lot of the ground work by implementing rotation and pinching.
Write some code (in a playground so you get instant feedback) that does some simple drag and drop work. Add in a line of code that turns the background a different color or changes its opacity when you let go/lift your finger.
Those types of incremental changes are well documented and you will be able to google them quickly. I think it's a great sign that you haven't found ready made examples. It means you are thinking outside the box.
This is an opportunity for you to think like a developer and a designer. If you post your results somewhere or release a project on GitHub at some point, others will be able to find your work using the same search criteria you used when you didn't find any results.
If you get stuck, post the code the code that has you baffled, and I'm sure you get help on this site. Best of luck 🍀

wxDialog inside wxWindows

when wx.Dialog is created it can take any position on the computer screen and take any dimension if style allows. I am trying to build dialogs and confine them within the application window.
I am not sure if my question is clear, I guess an online imagine would be a good example of what I need to do.
in the current link, "spectra analysis" is an exact example of what I need.
http://cdn.altrn.tv/s/b80a7d76-3293-45f2-84dc-07ae136df1c6_1_full.gif
The UI in the image is using the Multiple Document Interface, and in wxPython on Windows you can get the same UI by using the wx.MDIParentFrame and wx.MDIChildFrame. However be sure this is what you need because most users do not like MDI and even Microsoft abandonded it in their applications long ago.
You don't want dialogs. You most likely want to look at the AUI widgets. There are the old wx.lib.aui widgets and the newer wx.lib.agw.aui widgets. I recommend the AGW version as it is written in pure Python and has had lots of enhancements done on it. I don't think the old wx.lib.aui widgets have had any attention in years.
See the wxPython demo for examples.

How should i build my GUI in Qt?

I am wondering which way is the best to start building a GUI+SOFT in Qt. I am trying to build a sound media player based on a MVC pattern. Until now i have found 3 ways to do so.
1- Should I use a .ui file thanks to Qt designer, is it flexible enough ?
2- Should I use QML to make the design than integrate it to a C++ development ?
3- Should I just start from scratch and do it by hand without Qt Designer and using Qt library ?
Thank you very much for your answers.
NOTE: I'm using PyQt, so my comment may not be the most relevant.
I found Qt Designer to be great to create UIs, but then, when comes the time to modify them later, it becomes somewhat of a problem. Inserting new elements in an existing layout is often tricky, and you have to break all your layouts and re-assemble them (hoping you didn't mess anything up). Moreover, if your app is not trivial, you'll likely end up with code "fixing" what the .ui can't do. There are other tricky cases like that, but I don't remember them right now.
I ended up getting rid of my .ui files. So what I'd recommend is to initially use the designer to create the UI, and then use only the generated code from that point forward.
If you want your UI to be animated and it is not a requirement to follow platform UI appearance, QML is by far the best way to achieve this. If you want a UI that appears like any other application on your system and has limited animation then stick with QtDesigner and standard widgets.
I prefer building UI completely from scratch. This gives a lot of flexibility and better understanding of what is where, but on the other hand changing layout sometimes is a big headache.
I would use Qt Designer, as this is the easiest method IMHO.

GTK theme engine: where to start?

I would like to start coding a gtk theme engine, but i'm wondering where i can find some documentation, if any exists.
I know how to have look at someone else engine's code, examples, or torture tests and widget factories etc.., what i want instead is any documentation type, design, references, examples or tutorials possibly from reliable sources such as the Gnome foundation or the like.
You know, when coding for the Win32 platform one can pinpoint reliable references on the subject by following the MSDN and then read a variety of other sources to see how the problem has been tackled, if any.
So, where to find an authoritative, reliable and possibly complete source of documentation about GTK theme engine development? Is there any for real?
Later added:
Also, how to debug such an engine? What's the most sane and painless way to perform testing and debugging on such a delicate os' ui component?
Well, you can look for instance at the source for the gtk smooth engine in Ubuntu most of which is in one fairly enormous C file smooth_gtk2_drawing.c. I don't know if that's an especially good example, but probably finding whichever looks simplest or most actively maintained would be a good idea.
A theme engine is typically used to change the shape of widgets among other things. If you're just trying to change the color scheme and so on, you just need to create a theme.
Just like the theme engines, theres not a whole lot of documentation when it comes to creating a theme either. However, there are a ton of examples at http://www.gnome-look.org

C/C++ strip chart

Just a quick question.
I'm looking for a simple strip chart (aka. graphing) control similar to the windows task manager 'Performance' view. And have found a few, but they all rely on MFC or .NET :(
Am hoping that someone here might have or know where to get a simple strip chart Win32 control that is not MFC.
Thanks.
If you have to go the roll-your-own route look at the polyline GDI call. That can draw the entire line for you in one call.
I work on a system that draws charts with custom code (no 3rd party controls, all win32 GDI). It sounds really hard, but it isn't that bad.
A little math to map the points from your coordinate space to the device context, drawing gridlines/backgrounds, and Ployline. Done! ;)
Heck you can use GDI mapping modes to make the math easy (but I wouldn't).
If you have found a good MFC control, maybe your best approach would be to convert the code yourself to pure Win32 - MFC is a thin wrapper around the Win32 API after all. Out of interest, what is the name of the MFC control you found?
Few months ago I have also experienced the same issue: trying to find an existing implementation of a performance monitoring library, which looks similar to windows task manager. However because I couldn't find any existing library that works on multi-platforms (not dependent to MFC or .NET), to I decided to create my own library :-)
Today I just released the beta version of this library, and made it available as an open source project.
Check this out here: http://code.google.com/p/qw-performance-monitoring/
Let me know if this is useful. I am still doing some testing, to make sure that every features in this library work in Mac, Linux, and Windows. Once I am done with the testing, I will release the stable release. For the current time, enjoy using this beta version :-)
I don't think there is a standard one in the Win32 common controls library. You'll either have to use someone else's widget library, or roll your own using GDI to draw the graphs. It probably isn't too difficult to roll your own - just create a bitmap control, and set the image every time your data updates to a graph that you draw in memory.
Look at this amazing open source library: http://mctrl.sourceforge.net