Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. tab command

tab command

Scheduled Pinned Locked Moved Visual Basic
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GaryKoh
    wrote on last edited by
    #1

    hello if newline (\n) coding is vbclrf then a tab between word (\t) coding is....... can i know the answer please thank you in advance Gary

    B 1 Reply Last reply
    0
    • G GaryKoh

      hello if newline (\n) coding is vbclrf then a tab between word (\t) coding is....... can i know the answer please thank you in advance Gary

      B Offline
      B Offline
      bneacetp
      wrote on last edited by
      #2

      For the tab and newline characters, in VB.NET you can use the ControlChar constant:

      ControlChar.NewLine ' Generates a newline.
      ControlChar.Tab ' Generates a tab.

      Hope this helps. Best of luck in your programming efforts! :-D Happy Programming and God Bless! "Your coding practices might be buggy, but your code is always right." Internet::WWW::CodeProject::bneacetp

      G 1 Reply Last reply
      0
      • B bneacetp

        For the tab and newline characters, in VB.NET you can use the ControlChar constant:

        ControlChar.NewLine ' Generates a newline.
        ControlChar.Tab ' Generates a tab.

        Hope this helps. Best of luck in your programming efforts! :-D Happy Programming and God Bless! "Your coding practices might be buggy, but your code is always right." Internet::WWW::CodeProject::bneacetp

        G Offline
        G Offline
        GaryKoh
        wrote on last edited by
        #3

        hello how to use this controlchar.newline & controlchar.tab? a small example i wish to print the example like below Name Age Gary 18 i wish to print or show this sample of result in textbox may i know how it could be done? thank you Gary

        D 1 Reply Last reply
        0
        • G GaryKoh

          hello how to use this controlchar.newline & controlchar.tab? a small example i wish to print the example like below Name Age Gary 18 i wish to print or show this sample of result in textbox may i know how it could be done? thank you Gary

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          The TextBox's are not real good at tabs. Your best bet is to change the font of the TextBox you want to show this data in to a fixed width font, like Lucida Console or New Time Roman. This will make every character the exact same width, including tabs and spaces. Then, when you go to output the data:

          Dim outText As String
          outText = "Name" & ControlChars.Tab & "Age" & ControlChars.NewLine
          outText = outText & "Gary" & ControlChars.Tab & "18" & ControlChars.NewLine
          TextBox1.Text = outText
          

          This, of course, assumes that you have a TextBox on your form called TextBox1 and that it is setup as a MultiLine textbox. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups