We help IT Professionals succeed at work.

RTF Alignment

sbmc
sbmc asked
on
579 Views
Last Modified: 2008-03-17
There does not appear to be any way to align both margins of a paragraph using RTF control. Has anyone got code to do this.
Comment
Watch Question

Commented:
What is it your are trying to accomplish?

Author

Commented:
Im trying to align both margins of a paragraph as in Word.
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Can you elaborate on the OLE solution ie code example.

Thanks
don't need any code to perform this.  Just open vb, drop an ole object on the form, and pick work from the object type.  Put your text in the box, Highlight the text and right click for a menu and select paragraph formating, and change it from left alignment to "Justified",

Let me know if this isn't enough.

Thanks Brad.

Author

Commented:
Brad

I've tried using the OLE object but how do you resize it and save the data you enter.


Thanks


Dave
you want to resize the control at runtime?  and save the data at runtime or at developmnet?

Author

Commented:
The OLE object seems to determine its own size at run time regardless of the size you  initially create it. At runtime the File menu is not present so how do you save the data?

Use the OLE Save to FILE Statement to save it.
and the resize the control in the Form.Load event.

Make sure to do a DoEvents after resizeing the form.

Author

Commented:
OK thanks for your help.


Dave
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.