Author terry.reedy
Recipients Lita.Cho, jesstess, ned.deily, terry.reedy
Date 2014-07-23.03:20:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406085622.76.0.453752854992.issue21597@psf.upfronthosting.co.za>
In-reply-to
Content
I reviewed code and made the following changes in uploaded file:
Move some code and blank lines around.
Since you left packing within mBar frame, removed
       self.mBar.grid_columnconfigure(0, weight=1)
Since the only thing packed in the left frame was the text frame, renamed makeLeftFrame to makeTextFrame, removed the left frame and returned the text frame to be gridded directly.  Works fine.
Remove left_frame, graph_frame temporaries.

The questions that stopped me from pushing this are about the following lines in makeGraphicFrame.

        self._canvas = turtle.ScrolledCanvas(root,
                                             800, 600,
                                             self.canvwidth, self.canvheight)
        turtle._Screen._canvas = self._canvas #*
        turtle._Screen._canvas.adjustScrolls()
        turtle._Screen._canvas._rootwindow.bind('<Configure>', self.onResize)
        turtle._Screen._canvas._canvas['borderwidth'] = 0
        turtle._Screen._canvas.grid(row=0, column=0, sticky='news') ##
        ...
        return  turtle._Screen._canvas

It seems that in all lines except #*, 'turtle._Screen._canvas' could be replaced by 'self._canvas' or even a 'canvas' temporary. The ## line seems wrong, as the parent is root and 0,0 is not where the canvas shoud be gridded and indeed not where it is gridded after being returned.  The demo seems fine after commenting out the line. So it seems that the following should work.

        self._Screen._canvas = self._canvas = canvas = (
                turtle.ScrolledCanvas(
                root, 800, 600, self.canvwidth, self.canvheight))
        canvas.adjustScrolls()
        canvas._rootwindow.bind('<Configure>', self.onResize)
        canvas._canvas['borderwidth'] = 0
        ...
        return  canvas

Am I missing something?  Just curious, what is the <Configure> event? Or rather, what generates it?
History
Date User Action Args
2014-07-23 03:20:22terry.reedysetrecipients: + terry.reedy, ned.deily, jesstess, Lita.Cho
2014-07-23 03:20:22terry.reedysetmessageid: <1406085622.76.0.453752854992.issue21597@psf.upfronthosting.co.za>
2014-07-23 03:20:22terry.reedylinkissue21597 messages
2014-07-23 03:20:22terry.reedycreate