Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Jabaco Source |
|
1 2 3 4 |
Dim Success As Boolean Dim headerFormat As MessageFormat = New MessageFormat("Page {0}") Dim footerFormat As MessageFormat = New MessageFormat("- {0} -") Success = JBGrid1.Parent.print(JTable.PrintMode.FIT_WIDTH , headerFormat, footerFormat) |
Quoted
JTable.PrintMode
Jabaco Source |
|
1 2 3 4 5 |
Public Sub Printtxt Dim File As vbFileHandler = Open("TempFile.txt") Write(File,RichTextBox1.Text) Dim D As Desktop = Desktop.getDesktop D.print(New file("TempFile.txt"))End Sub |
Jabaco Source |
|
1 |
Dim D As Desktop = Desktop.getDesktop |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 |
Public Sub Command1_Click() Dim Success As Boolean Dim strHeader As MessageFormat = New MessageFormat("Page {0}") Dim strFooter As MessageFormat = New MessageFormat("- {0} -") ' table.print(JTable.PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, ' Boolean showPrintDialog, PrintRequestAttributeSet attr, Boolean interactive, PrintService service) ' JTable$PrintMode.NORMAL Success = JBGrid1.Parent.print(JTable$PrintMode.FIT_WIDTH , strHeader, strFooter, True, Null, False, Null) End Sub |
Quoted
...
Unfortunately there is a border in the printed version surounding the grid that I can not get rid of!
I tried all sorts of things to make that border disappear:
...
Dim Success As Boolean Dim strHeader As MessageFormat = New MessageFormat("Page {0}") Dim strFooter As MessageFormat = New MessageFormat("- {0} -") ' table.print(JTable.PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, ' Boolean showPrintDialog, PrintRequestAttributeSet attr, Boolean interactive, PrintService service) ' JTable$PrintMode.NORMAL Success = JBGrid1.Parent.print(JTable$PrintMode.FIT_WIDTH , strHeader, strFooter, True, Null, False, Null)
Jabaco Source |
|
1 2 3 4 5 6 7 8 |
Public Sub Command1_Click() Dim Success As Boolean Dim strHeader As MessageFormat = New MessageFormat("Page {0}") Dim strFooter As MessageFormat = New MessageFormat("- {0} -") Success = JBGrid1.Parent.print(JTable$PrintMode.FIT_WIDTH , strHeader, strFooter, True, Null, False, Null) End Sub |
Quoted
JTable printing HashPrintRequestAttributeSet
customized printing JTable
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Import javax.print.attribute.HashPrintRequestAttributeSet Import javax.print.attribute.standard.OrientationRequested Public Sub Command1_Click() Dim Success As Boolean Dim strHeader As MessageFormat = New MessageFormat("Page {0}") Dim strFooter As MessageFormat = New MessageFormat("- {0} -") Dim Mode As JTable$PrintMode = FIT_WIDTH Dim printRequestAttributeSet As javax#print#attribute#HashPrintRequestAttributeSet = New HashPrintRequestAttributeSet() printRequestAttributeSet.add(OrientationRequested.LANDSCAPE) Success = JBGrid1.Parent.print(Mode , strHeader, strFooter, True, printRequestAttributeSet, False, Null) End Sub |
java.lang.Exception: CallByName 'FIT_WIDTH' failed!
BUT when i delete the code and write again it works!
When i close my pc and next day open to work i happens again.
Have you got any idea?
Jabaco Source |
|
1 |
Dim Mode As javax#swing#JTable$PrintMode = javax#swing#JTable$PrintMode.FIT_WIDTH |