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
databasewpfwcftutorialquestion
2 Posts 2 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.
  • R Offline
    R Offline
    rain1178
    wrote on last edited by
    #1

    Hi, I hv an application that need user to key in value for 2 text box. After that i will bind data to combo box based on the values of text boxes. However, i don't hv a button to trigger that binding process. I want to perform this process in combo box click event. But i hv to click the combo box twice. How to make user only click combo box once and then the value will directly pop out in combo box?:confused: Private Sub cbSubconRoute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbSubconRoute.Click If (txtN.Text = "" Or txtC.Text = "") Then lblTxnStatus.Text = "Please Key In NSID And NSSPEC!" Return End If If (cbSubconRoute.Items.Count < 1) Then bindDataForComboBox() End If End Sub Private Sub bindDataForComboBox() cbSubconRoute.Items.Add("") cbSubconRoute.Items.Add(txtN.Text) cbSubconRoute.Items.Add(txtC.Text) cbSubconRoute.Refresh() End Sub

    N 1 Reply Last reply
    0
    • R rain1178

      Hi, I hv an application that need user to key in value for 2 text box. After that i will bind data to combo box based on the values of text boxes. However, i don't hv a button to trigger that binding process. I want to perform this process in combo box click event. But i hv to click the combo box twice. How to make user only click combo box once and then the value will directly pop out in combo box?:confused: Private Sub cbSubconRoute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbSubconRoute.Click If (txtN.Text = "" Or txtC.Text = "") Then lblTxnStatus.Text = "Please Key In NSID And NSSPEC!" Return End If If (cbSubconRoute.Items.Count < 1) Then bindDataForComboBox() End If End Sub Private Sub bindDataForComboBox() cbSubconRoute.Items.Add("") cbSubconRoute.Items.Add(txtN.Text) cbSubconRoute.Items.Add(txtC.Text) cbSubconRoute.Refresh() End Sub

      N Offline
      N Offline
      Nic Rowan
      wrote on last edited by
      #2

      I don't think you're not going to be able to do it that way. Why not add an event to the text boxes that checks if they both have text in and populate the combo box then? or maybe populate the text box on the Mouse_over event of the combo box?


      Beware the chickens, for in their silence, they plot... Life is too short to be taken seriously. -- Oscar Wilde


      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