mailRe: The close window decoration button?


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on February 05, 2010 - 01:21:
You probably need something like:

self.Bind(wx.EVT_CLOSE, self.exitGUI)

to catch this close event and direct it to exitGUI().  This shouldn't
call sys.exit() though!

Regards,

Edward


On 5 February 2010 01:15, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
On 5 February 2010 00:42, Michael Bieri <michael.bieri@xxxxxx> wrote:
Hi Edward

I removed this to force the output of references. It can be added in
line 77 by adding the keyword wx.CLOSE_BOX:

eg: kwds["style"] = wx.MINIMIZE_BOX | wx.CLOSE_BOX | wx.SYSTEM_MENU |
wx.CAPTION | wx.CLIP_CHILDREN

I tried adding this back, and the reference printout was not shown.
We should bind this event to exitGUI() as well.  Something is not
quite right though, as the close box doesn't properly terminate the
program.  I noticed that exitGUI() (should be named exit_gui() in
relax standards) calls sys.exit().  But, from memory, I thought that
that is not how a GUIs should be terminated.  The main window is
closed, the main loop terminates, and then the program runs off the
end and self terminates.  But somehow it's hanging.  Any idea what is
happening?  If you could work it out, would you like to try to make a
patch to fix the closure behaviour?  Cheers.


I deactivated the maximize box as well, as it would make the gui ugly
looking.

This is probably a good idea for the first version.  But later this
should be reactivated and the GUI made to handle this.  I.e. the
screen resize causes the objects of the GUI to resize certain parts
(maybe the fields for PDB input, etc. but not the text and buttons)
and then refresh the frame.  Scroll bars could also be added if
needed.  The current fixed frame size will be a problem in the future
if others add new analysis frames, especially the 3D canvas frame for
the custom analysis.

Regards,

Edward




Related Messages


Powered by MHonArc, Updated Fri Feb 05 02:20:10 2010