Results 1 to 4 of 4

Thread: [RESOLVED] Formatting a textbox

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2013
    Posts
    783

    Resolved [RESOLVED] Formatting a textbox

    Hello
    I'm sending combo items to a textbox
    Code:
    Private Sub Combo1_Click()
    
            If Text1 = "" Then
            Text1 = Text1 + Combo1.Text
    Else
            Text1 = Text1 + " " + Combo1.Text & vbCrLf & " "
           End If
            
    End Sub
    The output is Text 1

    Name:  combo.png
Views: 189
Size:  1.8 KB

    However I need the output to be as Text 2

    Thank you in advance

  2. #2
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Formatting a textbox

    Turn on horizontal scrollbar.

    EDIT1: Or make it wider.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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

    Re: Formatting a textbox

    You can keep track of how many items you wrote to the textbox. This way you'll know for sure when to add a carriage return or not when you've added an even number of items.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Formatting a textbox

    Ahhh, yes, I thought it was a word-wrap issue, and it's just a vbCrLf issue.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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