Printing Bold and Plain text in the same line
Is it possible to print bold and plain text in the same line?
I want a line to look like this:
TITLE: description
my code:
.fontbold = true
.print "TITLE: "
.fontbold = false
.print description
But this puts the two strings on different lines.
Any help would be great, thanks.
Re: Printing Bold and Plain text in the same line
Welcome to the forums. :wave:
Not in a standard textbox, but you can do that in a RichTextBox.
Re: Printing Bold and Plain text in the same line
It appears you are printing to a form or picturebox. Add the semicolon to the end of the line; additional printing will stay on same line. Remove semicolon and new line starts.
Code:
.fontbold = true
ControlName.print "TITLE: "; ' < semicolon
.fontbold = false
ControlName.print description
Re: Printing Bold and Plain text in the same line
Quote:
Originally Posted by LaVolpe
It appears you are printing to a form or picturebox.
Where did you get that from? (Just curious)
Re: Printing Bold and Plain text in the same line
The .Print part; see it a lot for school projects where teach wants stuff printed to form or picbox vs file. Could be other things, but don't think post it is textbox/rtb related.
Re: Printing Bold and Plain text in the same line
Nice piece of deductive reasoning. :thumb:
Re: Printing Bold and Plain text in the same line
Try with .Print command any combination of somethings below, separate them or ending with semicolon (;) or comma (,):
Spc(n)
Tab(n)
Tab
{AnyTextOrNumberExpression}
Re: Printing Bold and Plain text in the same line
Thanks for all the help and ideas. Will give it a shot..