Merged modifications from the 2.6 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
import os
|
||||
|
||||
import wx
|
||||
import wx.lib.printout as printout
|
||||
|
||||
@@ -9,6 +8,7 @@ import wx.lib.printout as printout
|
||||
buttonDefs = {
|
||||
814 : ('PreviewWide', 'Preview print of a wide table'),
|
||||
815 : ('PreviewNarrow', 'Preview print of a narrow table with color highlights'),
|
||||
816 : ('PreviewText', 'Preview print of a text file'),
|
||||
818 : ('OnPreviewMatrix', 'Preview print of a narrow column grid without a table header'),
|
||||
817 : ('PreviewLine', 'Preview print to demonstrate the use of line breaks'),
|
||||
819 : ('PrintWide', 'Direct print (no preview) of a wide table'),
|
||||
@@ -150,6 +150,17 @@ class TablePanel(wx.Panel):
|
||||
prt.SetFooter()
|
||||
prt.Preview()
|
||||
|
||||
def PreviewText(self):
|
||||
prt = printout.PrintTable(self.frame)
|
||||
prt.SetHeader("PROCLAMATION")
|
||||
file = open('data/proclamation.txt')
|
||||
data = []
|
||||
for txt in file:
|
||||
data.append(txt.strip())
|
||||
file.close()
|
||||
prt.data = data
|
||||
prt.Preview()
|
||||
|
||||
def PrintWide(self):
|
||||
self.ReadData()
|
||||
prt = printout.PrintTable(self.frame)
|
||||
|
Reference in New Issue
Block a user