473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.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.EnableVisualStyle s()
Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)

--
Thanks in advance!

Mika
Nov 20 '05 #1
2 1011
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
Nov 20 '05 #2
Hi Mika,
System.Windows.Forms.Application.EnableVisualStyle s()
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
"Mika M" <mika .m a h o n e n@kolumbus.fi> wrote in message
news:uF**************@TK2MSFTNGP12.phx.gbl... 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.EnableVisualStyle s()
Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)

--
Thanks in advance!

Mika

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Mr. B | last post by:
I've been seeking the solution to this. But can't figure it out (sounds simple enough). When you Populat a ComboBox, you can select the initial displayed items on startup simply by setting the...
8
by: Supa Hoopsa | last post by:
I have a databound combobox within a datagrid. I have set the DisplayMember and ValueMember. BUT, how do I capture the Value (SelectedValue) when the user changes the selection?
4
by: David Sworder | last post by:
Hi, I have a ComboBox that contains 1,400 sorted items . Here's the list: abba apple ... cabba caccaa capple
7
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking...
9
by: Li Pang | last post by:
I use a combobox control to populate the data. I want to prevent to change data (freeze the data in the filed). The only solution I have is to set Enabled property to "False", but it gray out the...
4
by: c_shah | last post by:
I am a beginner and learning VB.net There are two wasy to bind a combobox or a listbox First approach is to assign a datasource and displaymember Second approach is to iterate through datarow...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
6
by: =?Utf-8?B?U2NvdHQgTGFt?= | last post by:
Hi, Is there any way to access the values (not display names)of a combobox ? For example: combo1.DataSource = dataset1.tables(0) combo1.DisplayMember = "Name" combo1.ValueMember = "ID"
2
by: Paul | last post by:
VB.NET 2003. I am loading a dialog box form with a ComboBox. I'm using a DropDownStyle of "DropDown" rather than "DropDownList". I want them to be able to type in it fill in as they type. The...
2
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= | last post by:
Hello, I have a ComboBox that has a DataContext set on it. When a PropertyChanged event is fired (based on a static instance of some class), I'd like to update the DataContext on the combo, but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.