ComboBox questions

M

Mika M

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.DataSource = ds.Tables("Teams")
cboTeam.DisplayMember = "Team"
cboTeam.ValueMember = "ID"
cboTeam.DataBindings.Add("SelectedValue", 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.Application.EnableVisualStyles()
Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)
 
C

Cor

Hi Mika,

Drag a tooltipcontrol from the toolbox on your form.

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

ToolTip1.SetToolTip(Me.cboTeam, MydataField)

I hope this helps?

Cor
 
T

Tom Spink

Hi Mika,
System.Windows.Forms.Application.EnableVisualStyles()
Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)

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

System.Windows.Forms.Application.DoEvents()

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

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

Please respond to the newsgroup,
so all can benefit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top