]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/ScrolledMessageDialog.py
Added Get/SetItemToolTip
[wxWidgets.git] / wxPython / demo / ScrolledMessageDialog.py
1
2 import wx
3 import wx.lib.dialogs
4
5 #---------------------------------------------------------------------------
6
7 class TestPanel(wx.Panel):
8 def __init__(self, parent, log):
9 self.log = log
10 wx.Panel.__init__(self, parent, -1)
11
12 b = wx.Button(self, -1, "Create and Show a ScrolledMessageDialog", (50,50))
13 self.Bind(wx.EVT_BUTTON, self.OnButton, b)
14
15
16 def OnButton(self, evt):
17 f = open("Main.py", "r")
18 msg = f.read()
19 f.close()
20
21 dlg = wx.lib.dialogs.ScrolledMessageDialog(self, msg, "message test")
22 dlg.ShowModal()
23
24
25
26 #---------------------------------------------------------------------------
27
28
29 def runTest(frame, nb, log):
30 win = TestPanel(nb, log)
31 return win
32
33 #---------------------------------------------------------------------------
34
35
36
37 overview = """\
38
39 <code><b>ScrolledMessageDialog</b>(parent, msg, caption, pos=wx.DefaultPosition, size=(500,300))</code>
40
41 This class represents a message dialog that uses a wxTextCtrl to display the
42 message. This allows more flexible information display without having to be
43 as much concerned with layout requirements. A text file can simply be used
44
45 This dialog offers no special attributes or methods beyond those supported
46 by wxDialog.
47
48 """
49
50 if __name__ == '__main__':
51 import sys,os
52 import run
53 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])