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. combo box

combo box

Scheduled Pinned Locked Moved Visual Basic
5 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.
  • T Offline
    T Offline
    taherjaorawala
    wrote on last edited by
    #1

    I want to display data from the text file in the combo box but it should be displayed line wise. How should I do Thanks taher

    T 1 Reply Last reply
    0
    • T taherjaorawala

      I want to display data from the text file in the combo box but it should be displayed line wise. How should I do Thanks taher

      T Offline
      T Offline
      Tamimi Code
      wrote on last edited by
      #2

      is your text file is formatted in some way ??

      When you get mad...THINK twice that the only advice Tamimi - Code

      T 1 Reply Last reply
      0
      • T Tamimi Code

        is your text file is formatted in some way ??

        When you get mad...THINK twice that the only advice Tamimi - Code

        T Offline
        T Offline
        taherjaorawala
        wrote on last edited by
        #3

        the text file contains text in similar format textfile.txt line1 line2 lin3 end of text file the combo box should contain in a drop down menu and not in single line thanxs taher

        T T 2 Replies Last reply
        0
        • T taherjaorawala

          the text file contains text in similar format textfile.txt line1 line2 lin3 end of text file the combo box should contain in a drop down menu and not in single line thanxs taher

          T Offline
          T Offline
          Tamimi Code
          wrote on last edited by
          #4

          taherjaorawala wrote:

          the combo box should contain in a drop down menu and not in single line

          what do you mean ??

          When you get mad...THINK twice that the only advice Tamimi - Code

          1 Reply Last reply
          0
          • T taherjaorawala

            the text file contains text in similar format textfile.txt line1 line2 lin3 end of text file the combo box should contain in a drop down menu and not in single line thanxs taher

            T Offline
            T Offline
            TwoFaced
            wrote on last edited by
            #5

            Try the following: Dim data As String() = System.IO.File.ReadAllLines("c:\test.txt") ComboBox1.Items.AddRange(data)

            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