ComboBox questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mika M

    ComboBox questions

    Hello!

    I'm using VB.NET 2003 and application type is Windows Forms.

    I have created into DataSet a table named as 'Teams' containing columns
    (fields) ID, Team, and Description.

    After that ComboBox (cboTeam) is populated using this 'Teams'-table like ...

    cboTeam.DataSou rce = ds.Tables("Team s")
    cboTeam.Display Member = "Team"
    cboTeam.ValueMe mber = "ID"
    cboTeam.DataBin dings.Add("Sele ctedValue", myTable, "TeamID")

    .... and it's working fine.

    Anyway I would like to show 'Teams'-table 'Description'-field as ToolTip for
    the user when mousepointer is on the cboTeam or user just selected new team,
    because Team is just an abbreviation. How to do this?

    Second question: why ComboBoxes are not changing arrearance to XP-Styles
    althought other UI Components does when I use the following code in my Sub
    Main ...

    System.Windows. Forms.Applicati on.EnableVisual Styles()
    Application.DoE vents()
    System.Windows. Forms.Applicati on.Run(New frmMain)

    --
    Thanks in advance!

    Mika


  • Cor

    #2
    Re: ComboBox questions

    Hi Mika,

    Drag a tooltipcontrol from the toolbox on your form.

    Than you can add in by instance in the index change event

    ToolTip1.SetToo lTip(Me.cboTeam , MydataField)

    I hope this helps?

    Cor


    Comment

    • Tom Spink

      #3
      Re: ComboBox questions

      Hi Mika,
      [color=blue]
      > System.Windows. Forms.Applicati on.EnableVisual Styles()
      > Application.DoE vents()
      > System.Windows. Forms.Applicati on.Run(New frmMain)[/color]

      Why not the fully qualified name on Application.DoE vents()?

      System.Windows. Forms.Applicati on.DoEvents()

      --
      HTH,
      -- Tom Spink, Über Geek

      Woe be the day VBC.EXE says, "OrElse what?"

      Please respond to the newsgroup,
      so all can benefit
      "Mika M" <mika .m a h o n e n@kolumbus.fi> wrote in message
      news:uFDx2M04DH A.2136@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hello!
      >
      > I'm using VB.NET 2003 and application type is Windows Forms.
      >
      > I have created into DataSet a table named as 'Teams' containing columns
      > (fields) ID, Team, and Description.
      >
      > After that ComboBox (cboTeam) is populated using this 'Teams'-table like[/color]
      ....[color=blue]
      >
      > cboTeam.DataSou rce = ds.Tables("Team s")
      > cboTeam.Display Member = "Team"
      > cboTeam.ValueMe mber = "ID"
      > cboTeam.DataBin dings.Add("Sele ctedValue", myTable, "TeamID")
      >
      > ... and it's working fine.
      >
      > Anyway I would like to show 'Teams'-table 'Description'-field as ToolTip[/color]
      for[color=blue]
      > the user when mousepointer is on the cboTeam or user just selected new[/color]
      team,[color=blue]
      > because Team is just an abbreviation. How to do this?
      >
      > Second question: why ComboBoxes are not changing arrearance to XP-Styles
      > althought other UI Components does when I use the following code in my Sub
      > Main ...
      >
      > System.Windows. Forms.Applicati on.EnableVisual Styles()
      > Application.DoE vents()
      > System.Windows. Forms.Applicati on.Run(New frmMain)
      >
      > --
      > Thanks in advance!
      >
      > Mika
      >
      >[/color]


      Comment

      Working...