Pradeep, Microsoft MVP (Visual Basic) Please appreciate posts that have helped you by clicking icon on the left of the post.
"A problem well stated is a problem half solved." — Charles F. Kettering
I have done formatting in Word, to create tables, and a picture box holder. I save it as a .RTF, and load it into my RTB control. In the file, I have [1],[2],[3]
so that when it's loaded into the control, it's the template. Then I use .Select "[1]" to find the first placeholder, and then paste in the formatted field.
I do this for 45 fields, and even paste in an image before I print it.
You can do formatting for each field, and my receipt comes out correct every time.
Say I have an text file which groups my text under each XML tag.
dglienna -- this would be the same as your [1] tag.
If I indent my XML tags programically I also want the text to be
programically indented under the XML tag. If the text for any
specific XML tag wraps, I want the next line of text to also be indented at the same level as the XML tag.
Sorry the below quote won't keep indenting but each tag is indented and
the text line is indented under Tag3.
VB Code:
For example:
[Tag1]
[Tag2]
[/Tag2]
[Tag3]
<Text starts here and goes to end of textbox/RTB
<text starts her and goes to end of textbox/RTB
<text starts her and goes to end of text
[/Tag3]
[/Tag1]
Where the problem lies is programically getting the second, third, etc. text lines to indent. The only way I can see it is do a character count and compare this to the textbox width. Then force a Tab.
Last edited by dw85745; Jul 18th, 2005 at 01:52 PM.
I know the RTB will handle indents (tags) as well as a Textbox.
Where my hangup is ---- "whatever the meaning of is is " ----
is that I need to do all indenting programmically (not manually) since I have
a number of files, of which each may/may NOT have text that
will wrap or some may wrap more lines than others.
If this is doable in Word -- as you indicate -- a small example or snippet would be appreciated.
BTW: What's this rating business they started in the forum?
Does rating ultimately result in money, a prize, or just personal
satisfaction that one did a good job?
Will be glad to rate you, when done this thread, if your desires?