Wednesday, April 11, 2012

Finally

After being sick and having my computers crap out, I've gotten my laptop back up and running with the newest version of Ubuntu.  It took me a few hours to configure everything again for python devel, but now I'm in a better position before.  Finally being able to program in this environment and feeling better I went right back to programming.  I've completed 4/6 tasks (not including code cleanup) and I'm certain the last 2 won't take long.

One of the tasks I did today was regarding the Launchpad's looks.  The main argument was that Chris wanted a simpler version that didn't use my terrible microsoft paint graphis, and I wanted something more than just a few buttons.  Well, the deciding argument was won by Chris when we all agreed that neither of us are artistic, so we might as well just stick to what we can do, basic buttons.  Now the window is much smaller for the launchpad, and resizes to fit the other elements.  There are 4 buttons, edit/new/reports and daemon controls.  These are all tightly packed in the 150 x 150 window.

One of the things I worked on that I was not able to get working was the problem that if you resize the window below a certain point, the frames inside stop getting smaller.  This is expected, but you couldn't see the chopped off parts.  The big problem with this is you can't add scrollbars to frames in this gui library.  You can however add them to a "canvas", which at the time this first came up I didn't really understand.  My first approach was to just make a canvas, and put it between the window and the main frame.  Then add the scrollbars to that.  Running this everything showed up fine, but the scrollbars didn't act like anything was there.  I fiddled and googled around and found that canvas's don't init like the other widgets, and you have to call a update_idletasks method on the parent window in order for the sizing to work right.  This fixed it to the point to where the scrollbars knew what size things were, and how much scrolling could be done, but no scrolling actually happened when you moved them.  After searching some more, I didn't find anything that helped but it dawned on me that maybe the canvas was scrolling correctly, but the fact that the contents are all in Frames is the problem.  Since Frames don't scroll, then putting Frames into a canvas won't make them scroll.  I guess the whole deal is off then.  Maybe I can limit how small the window can be made?  That seems to be the only other valid option.

No comments:

Post a Comment