Hi.
I'm trying to use wxPython to write little note tool. For the note
window, I want there is only a TextCtrl inside, no border, no menu
bar, no tool bar, no status bar, no maximum icon/minimize icon. So I
use following code:
import wx
class MyNote(wx.Frame):
def __init__(self, parent):
# super(MyNote, self).__init__(parent, style=wx.SIMPLE_BORDER)
super(MyNote, self).__init__(parent)
self.InitUI()
self.Center()
self.Show(True)
def InitUI(self):
panel = wx.Panel(self, )
hbox1 = wx.BoxSizer(wx.HORIZONTAL)
vbox = wx.BoxSizer(wx.VERTICAL)
tc = wx.TextCtrl(panel, style=wx.TE_MULTILINE)
hbox1.Add(tc, 1, flag=wx.EXPAND)
vbox.Add(hbox1, 1, flag=wx.EXPAND)
panel.SetSizer(vbox)
app = wx.App()
frame = MyNote(None)
app.MainLoop()
···
*****
I thought when this piece code running, there will be a window with a
thin border & text contral filled up the whole window.
But, I found the TextCtrl is only at the letf-up corner of the window
& the size is not expanded.
Only if I remove the "style=wx.SIMPLE_BORDER" in the Frame __init__
method, then everything will work correctly, but there will be thick
border, maximum icons, not like a stick note but a wierd window.
Any body got any idea? I can't find any clue in wxPyton API doc.
Thanks in advance.