]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/ScrolledMessageDialog.py
Added GetListView accessor
[wxWidgets.git] / wxPython / demo / ScrolledMessageDialog.py
CommitLineData
8fa876ca
RD
1
2import wx
33785d9f 3import wx.lib.dialogs
cf694132
RD
4
5#---------------------------------------------------------------------------
6
34a544a6
RD
7class 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
cf694132 29def runTest(frame, nb, log):
34a544a6
RD
30 win = TestPanel(nb, log)
31 return win
cf694132
RD
32
33#---------------------------------------------------------------------------
34
35
36
1fded56b 37overview = """\
cf694132 38
33785d9f 39<code><b>ScrolledMessageDialog</b>(parent, msg, caption, pos=wx.DefaultPosition, size=(500,300))</code>
cf694132 40
8fa876ca
RD
41This class represents a message dialog that uses a wxTextCtrl to display the
42message. This allows more flexible information display without having to be
43as much concerned with layout requirements. A text file can simply be used
cf694132 44
8fa876ca
RD
45This dialog offers no special attributes or methods beyond those supported
46by wxDialog.
1fded56b 47
8fa876ca 48"""
1fded56b
RD
49
50if __name__ == '__main__':
51 import sys,os
52 import run
8eca4fef 53 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])