[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Removing the Close, Min, Maximize and frame with ANY gui toolkit

danfolkes

2/5/2008 5:18:00 PM

I was wondering if anyone knew how to remove the Minimize, Maximize
and Close from the frame around a gui.
Removing everything would work even better.

I would prefer instructions for tkinter, but any GUI would
suffice(glade, gtk, wx, Qt). I really would like to make a widget
like object instead of a window.

Thanks,
Daniel Folkes
http://dan...
2 Answers

unknown

2/5/2008 6:33:00 PM

0

Google for overrideredirect().
Louis

"Daniel Folkes" <danfolkes@gmail.com> wrote in message
news:e4db9ad2-0915-4208-ab3c-4b5547f3e6a3@y5g2000hsf.googlegroups.com...
> I was wondering if anyone knew how to remove the Minimize, Maximize
> and Close from the frame around a gui.
> Removing everything would work even better.
>
> I would prefer instructions for tkinter, but any GUI would
> suffice(glade, gtk, wx, Qt). I really would like to make a widget
> like object instead of a window.
>
> Thanks,
> Daniel Folkes
> http://dan...


Mike Driscoll

2/5/2008 6:41:00 PM

0

On Feb 5, 11:17 am, Daniel Folkes <danfol...@gmail.com> wrote:
> I was wondering if anyone knew how to remove the Minimize, Maximize
> and Close from the frame around a gui.
> Removing everything would work even better.
>
> I would prefer instructions for tkinter, but any GUI would
> suffice(glade, gtk, wx, Qt). I really would like to make a widget
> like object instead of a window.
>
> Thanks,
> Daniel Folkeshttp://dan...

I've only ever dabbled with Tkinter, so I'm not sure what its syntax
is. However, with wxPython, it's fairly trivial:

<code>

import wx

class MyPopup(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY, 'Test Frame',
#size=(450,295),
style=wx.STAY_ON_TOP # forces the window to be
on top / non-modal
##|wx.DEFAULT_FRAME_STYLE # enable this to get the
min/max/close buttons
## |wx.CLOSE_BOX
|wx.CAPTION
|wx.RESIZE_BORDER)

btn = wx.Button(self, wx.ID_ANY, 'Close')
self.Bind(wx.EVT_BUTTON, self.close, btn)
# display the frame
self.Show()

def close(self, event):
self.Close(True)



if __name__ == '__main__':
app = wx.PySimpleApp()
MyPopup()
app.MainLoop()

</code>

I included a close button as it can be a pain to close these suckers
when you disable the default buttons. I read in the last week or two
that there's some Linux variant out there that will display the
minimize button regardless.

If all you want is a non-modal dialog, you might look at the wx.Dialog
widget or one of the popup widgets. There's also a Toaster widget...

I found this link about Tkinter:

http://mail.python.org/pipermail/python-list/2002-July/1...

Hope that helps you.

Mike