dequi wrote:Any good getting started Python / wxWidgets tutorials you can recommend?
if you have python 2.7 installed download wx from herehttp://downloads.sourceforge.net/wxpyth ... 0-py27.exe
then download the python demo from herehttp://downloads.sourceforge.net/wxpyth ... .0.2.0.exe
if it doesn't work in the demo it is not going to work in EG
but the demo will show just about every bit of wx. and it also shows the code used to create that bit. it does not show every single thing that bit can do... that is going to require yout to Google it.
learn the google syntax and boolean it will help greatly filter things. what i normally do for a search would be as follows
python wx notebook phoenix
change out notebook to any control you want to know about
NOTE... wx phoenix is not in EG but it has a much better webpage layout. just keep in mind that most of the functions and methods are the same but there are things that can sometimes be different and will require you to remove the phoenix from the search. but when using the old style web
the biggest trick is that you have to look at the inheritance diagrams for each thing you look up. so something like the wx.Notebook will be a subclass of wx.Window. so wx.Notebook will have all of it's own methods and attributes. but also has all of the methods and attributes from wx.Window. it works like this all the way down the diagram. so the top level item has it's own abilities plus all of the abilities of each level beneath it
I do not use any wx layout programs as i find that none of them actually work properly. or they cost money that I am not willing to spend. the easiest is to grab a pencil and some graph paper. and draw out the dialog you want. because you have to remember that everything GUI based is drawn in pixels and pixels are squares. and so is graph paper. so it makes it pretty easy for understanding things like borders on different elements because upi have to remember that borders are compounded so if you add a border of 10 to the widget when you add it to the sizer. and then you add that sizer to another sizer with a border of 10 that widget now has a border of 20 so learn the sizer flags.
Add(widget, proportion, flags, border size)
allows widget to expand
applies to borders
applies to alignment of the widget
and can be combined
wx.ALIGN_BOTTOM | wx.ALIGN_CENTER aligns the widget center of the cell at the bottom of the cell
so typically you would see
sizer.Add(widget, 0, wx.EXPAND | wx.ALL, 10)
but you can do
sizer.Add(widget, 0, wx.EXPAND | wx.ALIGN_BOTTOM | wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)
which would expand it align bottom center and place a border of 10 pixels at the top and bottom
this is how i believe this functions.. i never really read up on it too much
the second parameter when adding to a sizer is the proportion.. so a 0 will expand only in the opposite direction the sizer is made for.. so if the sizer is made for horizontal then the widget will only grow vertically
a 1 means that it will grow in both directions. this also controls what % of the grown space is gotten by what widget. so if you have a 0 and another widget has a 1 then the one with the 1 gets more space then the widget with a 0
dequi wrote:Do you use a IDE?
I use PyCharm with a couple of plugins for things like xml and markdown I do not use the version control built into pycharm.
dequi wrote:have you used gitKraken or another git GUI?
I use GitKraken tho i have been thinking about changing because they still have not fixed this crappy memory leak in it. and it's a HUGE one.. after a few days it's up to 4-5 gigs of ram used. I have told them several times about it. with screen shots of my task manager and I have never gotten a response back and with each new version they have not fixed it.
They are predicting cold weather this long easter-weekend, and it looks I'll have some spare time on my hands to do some studying
I am going to send you a PM with a way to contact me that will typically get an instant reply. I know how frustrating it can be when you are having an issue and you know that a simple reply from someone can greatly spped up the process. or at the very least give you a better understanding.
I wish i had someone i could do this with. to many months spent doing the trial and error thing to gain an understanding of how things work. because you can't always draw a clear picture from what you find on the internet or in a book
I know this is going to sound pretty corny.. but even tho you have the basics down. if you have an android device download an app called "Learn Python" and do the lessons and tests. even tho i have been doing this for a little bit that app taught me quite a few things