-
I have two RichTextBoxes and when I print out their text
it prints each one on a separate page,how do I get it to print on the same page. Thanks in advance for any help.
Also the currentX and currentY don't seem to work.
[Edited by AndyB on 07-13-2000 at 07:39 PM]
-
Wouldn't it just be:
Code:
Printer.Print Richtextbox1.text & Richtextbox2.text
-
Thanks Matthew that works but I would also like to be able to change the position of the text on the page.
-
If it's a richtextbox..than you can use it's alignment functions.
Code:
SelAlignment Property
rtfLeft 0 'Left.
The paragraph is aligned along the left margin.
rtfRight 1 'Right.
The paragraph is aligned along the right margin.
rtfCenter 2 'Center.
The paragraph is centered between the left and right margins.
Richtextbox1.SelAlignment = rtfCenter
-
Can the contents of the RichTextBox be put into a variable
and then positioned on the page using CurrentX and CurrentY.
-
Code:
Printer.CurrentX = (Printer.Width - Printer.TextWidth (Richtextbox1.Text)) \ 2
Printer.Print Richtextbox1.text & Richtextbox2.text
Printer.ENDDOC
I believe you have to put it in yourself.
Code:
Richtextbox1.text = Richtextbox1.text & "red..white..blue"
'or
Richtextbox1.Seltext = "red white green blue"
-
Thanks again for your help.I don't have time to try it now but I'll try it later.
-
Just a note, when printing from the RichTextBox, it's a good idea to use the SelPrint method.
Code:
RichTextBox1.SelPrint (Printer.hDC)
-
That will work Megatron...but it is RichTextBox1.SelPrint (Printer.hDC) will only print the textbox stated. AndyB wants to print both Richtextboxes on the same page ;]. But, as always, your "notes" are always useful :).
-
I also want to be able to print the contents of the RichTextBoxes to the place of my choosing on the page. If I could do that, it would make my day better than it has already been.