Results 1 to 8 of 8

Thread: Printing Bold and Plain text in the same line

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printing Bold and Plain text in the same line

    Welcome to the forums.

    Not in a standard textbox, but you can do that in a RichTextBox.

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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
    Last edited by LaVolpe; Dec 19th, 2007 at 02:11 PM.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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)

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printing Bold and Plain text in the same line

    Nice piece of deductive reasoning.

  7. #7
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    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}

  8. #8

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    2

    Re: Printing Bold and Plain text in the same line

    Thanks for all the help and ideas. Will give it a shot..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width