Results 1 to 3 of 3

Thread: highlight label caption

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    23

    Question

    Hi everybody
    can anyone tell me if it is possible to highlight certain words in a different font colour when you assign a caption to a label at runtime ?
    Thanks

  2. #2
    Guest
    I don't think a Label can handle it, not designed to.

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Matthew is right..but you can accomplish the task by using a couple of labels.
    Code:
    Private Sub Form_Load()
        Label1.AutoSize = True
        Label2.AutoSize = True
        Label3.AutoSize = True
        Label1.Top = 100
        Label2.Top = 100
        Label3.Top = 100
        Label1.Left = 100
        Label2.Left = Label1.Left + Label1.Width + 200
        Label3.Left = 200 + Label1.Width + Label2.Width
        Label2.ForeColor = vbRed
        Label1.Caption = "Look for"
        Label2.Caption = "Red"
        Label3.Caption = "Highlites"
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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