![]() |
YEY!! My First GUI To share with the world!!
Ok, it's my first, so it ain't great!! But it ain't bad either! It does not look perfect, but it's only created on the basics, It's an updated version of my lyric finder..
:
The reason for all the Filler1 etc is to fill the grid to generate gaps i could find no documented way of doing it, so that worked fine!! Need Tkinter to run. Any feedback or new ideas, let me know :D |
First obvious crit - don't use Tkinter. It's inherently flawed and very slow (apparently its bound to Python via tcl, so two layers of interpreted language). Use a real GUI toolkit like wxPython or PyQt. Tkinter's many flaws can be found by Googling for it. Tkinter apps look horrifically ugly under Linux too.
Secondly - Don't hardcode paths like "C:\Lyrics" - there is no 'C:\' for me here, so I had to manually change everything to have a go. Thirdly - More feedback. I entered my artist and song-name ("Smashing Pumpkins", "Cherry"), and then pressed Search. Nothing happened. I pressed Open Chosen File.. still nothing, except looking at Konsole showed me that you've got a bug for each. Here's the trackback: Pressing "Search": :
Exception in Tkinter callback:
Exception in Tkinter callback |
It works fine for me!! :S I have the same python version, i've just run the exact same search as you now, and it's fine!!
Also, i have wxPython, but i can't find a decent on-line tutorial! lol So if you've got a link or anything :D that would be good. And thanks for the note about paths! Never really thought about that. Thanks :D |
There are plenty of good wxPython tutorials. Try working through this
|
Thanks, I'll see what wonders this brings :D
Thanks for your input :) |
I agree with Cerulean, Tkinter is terrible. wxPython IMO is the best I have used. The homepage has semi-good tutorials, then I would suggest just looking at other people's code to get better ideas of how to do things. I was able to code a nice looking GUI in about 10 hours total.
|
Tkinter seems ok for small little apps like that!! i may be wrong!! But, like i say seems ok, I'll probably look in to using wxPython for larger scale projects, but atm it seems to suit ok,
and it's easy to use :D :D hehe |
I find wxPython easier to use. Use wxPython for a little and you'll see that it is too. It seems like a hassle, learning something new after you just learnt a bit of Tkinter, but let me just re-phrase why Tkinter is bad:
1. Slow. Tkinter goes through an extra layer of interperation (it wraps tcl/tk), while wxPython is directly bound to wxWidgets (which is written in C++). 2. Applications look ugly and don't integrate with the rest of the Linux desktop (it doesn't use GTK or Qt). I can send you a screenshot if that would help you realise the true vulgarness of the Tkinter GUI. 3. Lack of high-level abstraction. Tkinter is a pretty low level, so you're touching the guts far too often. That really does make it harder to use. |
ok, :D I'll switch to wxPython straight away! hehe, Thanks for the tips..
You live and learn, trail and error and all that palava, thanks :) |
| All times are GMT -5. The time now is 5:02 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC