|
-
Jul 13th, 2000, 06:35 PM
#1
Thread Starter
Junior Member
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]
-
Jul 13th, 2000, 11:10 PM
#2
Wouldn't it just be:
Code:
Printer.Print Richtextbox1.text & Richtextbox2.text
-
Jul 13th, 2000, 11:43 PM
#3
Thread Starter
Junior Member
Thanks Matthew that works but I would also like to be able to change the position of the text on the page.
-
Jul 14th, 2000, 12:19 AM
#4
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
-
Jul 14th, 2000, 01:12 AM
#5
Thread Starter
Junior Member
Can the contents of the RichTextBox be put into a variable
and then positioned on the page using CurrentX and CurrentY.
-
Jul 14th, 2000, 01:52 AM
#6
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"
-
Jul 14th, 2000, 02:29 AM
#7
Thread Starter
Junior Member
Thanks again for your help.I don't have time to try it now but I'll try it later.
-
Jul 14th, 2000, 08:24 AM
#8
Just a note, when printing from the RichTextBox, it's a good idea to use the SelPrint method.
Code:
RichTextBox1.SelPrint (Printer.hDC)
-
Jul 14th, 2000, 07:06 PM
#9
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 .
-
Jul 15th, 2000, 12:39 AM
#10
Thread Starter
Junior Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|