Solved

RTF Alignment

Posted on 1998-08-20
10
546 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.
0
Comment
Question by:sbmc
  • 5
  • 4
10 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1430135
What is it your are trying to accomplish?
0
 
LVL 2

Author Comment

by:sbmc
ID: 1430136
Im trying to align both margins of a paragraph as in Word.
0
 
LVL 1

Accepted Solution

by:
blwatkins earned 200 total points
ID: 1430137
There is no way to make a RTF control do what you want, The correct words is "Full Justification" this will make both sides of the text be alligned.  

The only way to achieve this is to Use the Microsoft Control "OLE" and make its .class be a word document.  Then you can format the text inside of the control with any formating you can do in word (such as : Full Justification).  This box will look just like a text box control.


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:sbmc
ID: 1430138
Can you elaborate on the OLE solution ie code example.

Thanks
0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430139
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.

0
 
LVL 2

Author Comment

by:sbmc
ID: 1430140
Brad

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


Thanks


Dave
0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430141
you want to resize the control at runtime?  and save the data at runtime or at developmnet?

0
 
LVL 2

Author Comment

by:sbmc
ID: 1430142
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?

0
 
LVL 1

Expert Comment

by:blwatkins
ID: 1430143
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.

0
 
LVL 2

Author Comment

by:sbmc
ID: 1430144
OK thanks for your help.


Dave
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question