ComboBox List/add Item, If Item Exists, Dont Add It Again!
Dudes and Dudeesses I need help!
I have a problem with a combobox within a form. I'm scanning down the spreadsheet for values and asking a combobox to .additem, however, the same value may appear twice whilst scanning down. Is there an if statement that will look and check the combobox to see if it is already added, if so dont add it again, if not, add it?
as below,
Code: combobox.AddItem "Hotmail" combobox.AddItem "Yahoo" combobox.AddItem "Hotmail" Hotmail will be added twice, how can I stop that?
If worst comes to the worst, I can sort it out with a long winded method, but I'm hoping theres a quicker way.
Thanks for all your help
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Combobox - How To Get Information As First List-Item?
Howdy there,
I got a problem getting a little Help-Text in a Combobox:
I always get an error (Error-Code 94) when displaying the Combobox for the first time or when I am trying to change the Combobox value to the first Item. (Index 0)
What I actually would like to do is just displaying a short help message as the first Combobox-Item with the Index 0.
Here is my code:
REM Short description goes here
Me.cboConfig.AddItem "Please select Configuration!"
REM Filling the list with values
For lIdx = LBound(vConfigs) To UBound(vConfigs)
Me.cboConfig.AddItem lIdx
Me.cboConfig.List(lIdx + 1, 0) = vConfigs(lIdx).strName
Me.cboConfig.List(lIdx + 1, 1) = vConfigs(lIdx).strInfo
Me.cboConfig.List(lIdx + 1, 2) = vConfigs(lIdx).strType
Next
How can I catch the error-message (I translated the message from German so it might be a little bit different):
"An internal error has occurred: Error 94 - Invalid use of Null"
Can anyone help with this ?
Could anyone give give me some help with a little example?
Thanks in advance!
Best Way To Save Combobox Item List Etc...
Hi there, working on this problem for a few day now and cannot get anywhere. I'm trying to make an app that will be able to save the user's folder names as they browse through their own folders using my app. The main purpose is so users can build a collection of the selected folders. Obviously for every folder I need to get and save path somehow. So far I am using a combobox and a command button. I'm also a Treeview and fileBox but I have no problem with those.
The code below works but I need to find a way to save that folder's path on user's pc and load it again when app loads.
Is it better to use registry or ini or other?
BTW, I use to be able to store all combo1's items to a file using: SaveContents Combo1, App.Path & "MyCollection.txt"
but this wont even work now??
Any comment would be appreciated, thanks
here is the code:
VB Code:
Option ExplicitDim ComboData() As String Private Sub Form_Load() LoadContents Combo1, App.Path & "MyCollection.txt"End Sub Private Sub Form_Unload(Cancel As Integer) SaveContents Combo1, App.Path & "MyCollection.txt"End Sub Private Sub AdToCol_Click() ' clicks to add Path = File1.Path If Label1.Caption <> "" Then Combo1.AddItem Label1.Caption ReDim Preserve ComboData(Combo1.ListCount - 1) ComboData(Combo1.ListCount - 1) = File1.Path End If End Sub Private Sub Combo1_Click() File1.Path = ComboData(Combo1.ListIndex)End Sub
Adding Combobox Item To List Box
i want to add a combo box item(when the user clicks it)to display in a listbox....i have tried a few things w/ the additem code and have not yet found anythnig that worked .how would i do this
Making Combobox Display The Next Item In The List.
I have a combobox that the user picks a state from. when a certain integer hits a certain point, I'd like it to move down to the next item in the combobox.
Here's my code, but it doesn't work.
Code:
Dim theState As String
theState = USAcombo.List(USAcombo.ListIndex)
If Age = 19 And Page = 52 Then
theState = USAcombo.List(USAcombo.ListIndex) + 1
End If
I need, however, not the variant value that it gives me, but rather the actual text used in the combo box. For instance, AL is USAcombo.List(0), but I don't want the number "0", I want the letters "AL" (for alabama).
Hope this makes sense, and all help is appreciated!
Single Item List Box (item Not Really Selecting)
Application=Access2002
The following code has worked for me in the past but won't now for some reason.
I have a private function and/or subs that performs a few simple operations such as setting listbox rowsources and simple math functions on a form. The queries set as rowsource use criteria from other single item listboxes.
Now, for some reason, the queries won't return values until the previously .selected(0) = true (single item) list boxes have been clicked on.
Problem has only been in creating a new form. Perhaps the problem did not occur in older created forms due to compatibility?
Private Sub fraEWTo_AfterUpdate()
[Edited]
lstRotorHoursPriorTo.RowSource = "qryRotorSwapHoursTotTo" 'gets hoursprior from tblRotors
lstRotorHoursPriorTo.Selected(0) = True ' This is one place where the problem seems to exist, the control does not function until it has been clicked on via mouse.
LstClockInTo.RowSource = "qryRotorSwapRAHoursIPTo"
LstClockInTo.Selected(0) = True
txtRACHIPTo.Locked = False
txtRACHIPTo.Value = txtClockHoursTo.Value - lstClockInTo.Value 'nor will this until the lstClockInTo box has been manually selected
A Mechanic in a Programmers shoes
Thanks
Edited by - greenfch on 12/7/2005 11:22:52 AM
List Box Item Scrolling (Next Item)
Hello,
I was wondering what the code would be for a command button to make the next item in the list box be selected?
Kind of like a NEXT button.
EXAMPLE:
List box Line 1
List box Line 2
List box Line 3
List box Line 4
If List box Line 2 is selected then clicking the next button would DESELECT List box Line 2 and SELECT List box Line 3.
If I didn't explain enough just let me know.
Stilekid007
How To Search Listbox For Item If Item Not Found Add Item?
Hi, lol man I cant find nothing today when I search the forum.
This my latest problem, How do I search a listbox for an item lets say "Game Over" And if the item is found the program does nothing, but if the item is not found it will add "Game Over"
Thanks Again
? Collection Item Exists
Hi All,
I am trying to write a general function to test if a collection item exists. I have managed to do this for a specific collection, but i would like the function to be able to accept a passed collection.
for example,
itemExists(collection)
would return true or false.
Can you pass a collection ro a function, i was planning to return true or false from the function, but if the collection item i am trying to pass does not exist i get the error 'subscript out of range' before it is passed to the function.
i must be missing something simple.
please help
i want to be able to use the function in the following way
if (ItemExists(colABC(1))) then
or
if (ItemExists(colABC(1).colXYZ(2))) then
Simon
Finding Out If An Item Exists...
I need to know if an item in a collection exists...
How do I do this?
say mCol is a collection and there are 2 items in it. ne with an ID of "WOOF" and the other "BADGER". What I want to do is find out if "WEASEL" exists...
VB Code:
If mCol.Item("Weasel") = <WHAT DO I PUT HERE> Then 'Code for when it already existsElse 'Code to add new itemEnd If
I have tried Is Nothing and others, but I can't seem to work it out.
The only way I can see it being done is by trapping the error caused by trying to find an item that doesn't exsist and place the code there, but surely this is bad programming
Booooooooooo...Need a Scooby Snack!!!
Checking If A Certain Item Exists In A Listbox
hey people...
i have a listbox, but i dont want to add an item in the listbox if theres an item in the list box that already exisits with the same value...
so i thought i could search the listbox to see if a certain item already is in the listbox...can anyone tell me how to do this??
thanks,
dan
Checking If An ITEM Already Exists In A Listview
Sorry wrong forum -> should be VS 2005 instead of classic vb
hi,
I'm currenly trying to load two textfiles in a listview.
afterwards i'm updating one of the columns where i have the following problem
i donnot know if a certain index of the item already exist
so for instance i want to update a subitem but i donnot know if the item itself exists.
the method
listview.item(2).exists
does not seem to exist
is there another way ?
How Do I Detect Whether A Collection Item Exists?
Hi,
I was just wondering how to detect whether a particular item in a collection exists?
ie. How do I check whether EMS Tools already exists in the following CommandBars collection?
Application.CommandBars("EMS Tools")
Thanks
Chris
Checking To See If An Item Exists In An Array
I've got an array of up to 30,000 items. I then have a new item that I need to check against the array to see if it is already in there. If the item isn't already in the array, it is added.
Is there anything faster than looping through the entire 30,000 items, comparing one-by-one to see if the item is already in the array?
I've sped things up a bit by jumping out of the check loop once the item is found to be in the array, but that doesn't help when the item being checked is near the end of the array.
A friend suggested breaking the array in smaller sections so that smaller only portions of it would need to be checked. I'm going to give that a try.
Any other suggestions?
Problem Checking If Collection.item Exists
Hi,
My program was working fine using VB6 on XP, but then that computer died. So I'm --attemping-- to run the program on Windows 2000 Advanced Server. Unfortunately, some of the code doesn't seem to work on this platform.
In particular, I have the following code (snippet) that checks to see if an item exists in a collection:
1. securities(i) contains a string i.e."abc". I check to see if that item exists in the objTSRecords collection as follows:
...
If ItemExists(objTSRecords, securities(i)) Then
...
2. This invokes the follwoing "ItemExists" function latter in the same module:
Function ItemExists(col As TSRecords, key As String) As Boolean
Dim dummy As Variant
On Error Resume Next
dummy = col.Item(key)
ItemExists = (Err <> 5)
End Function
3. When the execution gets to the line:
dummy = col.Item(key)
The code jumps to the class module ("TSRecords.cls") where the collection is defined:
Public Function Item(ByVal Index As Variant) As clsTSRecord
Set Item = collTSRecords.Item(Index) ' <-- error occurs right here
End Function
I get (even though I've got "On Error Resume Next" defined):
"run-time error '5':
Invalid procedure call argument"
Although I've been trying to solve this for hours I keep getting this error. This code worked fine under XP just yesterday! Maybe there are some patches I need to get to fix this, or maybe the VB 6 on XP is more forgiving of my programming errors....?
Anyone got any ideas?
Thank you very much,
Robert
Unable To Reference A Dictionary Item When The Key Exists ??
Hi all,
I have a dictionary called 'RecordBag' correctly defined and correctly populated a few lines earlier in my code. But when I reference an item in the dictionary directly like so...
Code:
fvars.Recordbag("Customer") = "Test String"
I get the error message...
'Compile error: Wrong number of arguments or invalid property assignment.'
OK says I - lets try this...
Code:
fvars.Recordbag("Customer").Item = "Test String"
I now get the error message ...
Run-Time error '424': Object Required.
Literally the line before my attempted equate I can do a print out of the dictionary and I get the following in format KEY 'space' ITEM
UID UID::RF::0::0
Ref Ref::RF::0::0
Customer Customer::CB::9999::0::0
OrderNo OrderNo::TB::9999::0
PackNo PackNo::TB::9999::0
MoistureContent MoistureContent::TB::9999::0
Commodity Commodity::CB::9999::0::0
Species Species::CB::9999::0::0
TimberProfile TimberProfile::CB::9999::0::0
Length Length::TB::9999::0
Quantity Quantity:D::9999::0
TargetCharge TargetCharge::TB::9999::0
BarCode BarCode::RF::0::0
PlantNumber PlantNumber::RF::0::0
TreatmentDate TreatmentDate::RF::0::0
CycleRef CycleRef::RF::0::0
... and intellisense shows that 'fvars.Recordbag("Customer")' does in fact equal 'Customer::CB::9999::0::0'
Has anyone got an idea of what may be going wrong here? It has me stumped. I have done a reboot of VB just but still no joy.
Thanks in advance
Combobox: Automatch Item, Select In Other Combobox, Remove From Both
I have 2 comboboxes and a listbox. I want the user to select an item from one combo, with then matches the item to its corresponding item in the 2nd combo, then add both to a list box. The user can either select from the 1st combo or from the 2nd...either one will match to the corresponding item in the other. Both comboboxes also have to be autocompleting. Once the selection is added to the listbox, the user can remove it which will delete the item from the list and add them back into the appropriate comboboxes. I have this working except for one thing.
When autocompleting, if the user types in what they want and its found and they hit ENTER, I am getting an error when trying to remove the item from the combos. It tells me the index is invalid and sure enough, when I check what the index is, its -1. It seems that the user isn't selecting an item in the combo even though its matched.
This is what I tried. It works if an item is clicked or chosen by pressing the up/down arrows. It also works if they type what they want, its matched, then they press up/down or some other number but will NOT work if they just type it, its found and they hit enter:
Code:
Private Sub cmdAdd_Click()
List1.AddItem cmbo(0).Text & " " & cmbo(1).Text
cmbo(0).RemoveItem (cmbo(0).ListIndex)
cmbo(1).RemoveItem (cmbo(1).ListIndex)
End Sub
Oddly, if I put the opposite combo item to be deleted, it works...so, if I just selected something from combo 1, the following works:
Code:
Private Sub cmdAdd_Click()
List1.AddItem cmbo(0).Text & " " & cmbo(1).Text
cmbo(0).RemoveItem (cmbo(1).ListIndex)
cmbo(1).RemoveItem (cmbo(1).ListIndex)
End Sub
Any ideas anyone? Perhaps I need to post the function I use for autocompleting? Let me know please...
How To Get Any Item In ComboBox - VB6
What is the simplest, most basic, neanderthal way of getting any item in a ComboBox, whether it's selected or not? I've seen various ways, but every one is more complicated than it seems to need to be. I know how ListIndex and List work, but only know how to get the selected item this way.
Basically if item 6 is selected, I need to get item 6 through 4.
How To Add Item In Combobox
Hi all..
May i know how to add item in Combobox using code ..I just add item in Combobox using Combo box properties..
Thanks in advance
Combobox Set Item...
Just a quick question...
How do I make combobox to show the very first item when form loads.
I did it b4 and can't remember from top of my head...
Cheers...
Add Item In Combobox
how do you add an item in a combobox without remove the others items
i just want my new item to be placed after the others
Click Item In Listview Then Show That Item In Combo As Index = 0
Hi guys,
I have a listview (lvwUserPunchedOut) that is populated with records in a database (persons first name in one column and last name in the second column), what I am looking to do is if I select a persons name by clicking on it in the listview on frmMain, and then bring up frmSearchCriteria, i would like to show that selected name in the combobox as default (cboEmployee.ListIndex = 0) on frmSearchCriteria (the combobox is sorted = True and is also populated with first name and last name of the person)
How would this be done? Hope I make sense. Thanks in advance.
Combobox Item Tooltips
I'd like to display a tooltip for each individual item in the dropdown of a combobox. I can use subclassing to tell me when the mouse is over any particular item, and I can create a tooltip with a tiny form. But when I show this tooltip it always appears behind the dropdown. If I call the form's ZOrder method, that has no effect, and if I use SetForegroundWindow on the form, that dismisses the dropdown. So I'm stuck. Any ideas?
I suppose an alternative would be to use a status bar in the main form to display the information I want for each item in the dropdown. It's just that the information will then be rather far away from the combobox, which will be where the user is looking.
Combobox Disabled Item
I would like to have an item in a combobox which represents a division between two groups of choices; one set above it and one below it. For instance I could use a row of minus signs for the item. But I want this item to be disabled, i.e. it should not be highlighted when the cursor moves over it, and the user should not be able to select it. But how do I go about this?
Maybe it needs to be subclassed, but subclassing comboboxes seems to be rather hard. The best I've been able to come up with (using subclassing) is to move the cursor off the item whenever it goes over it, but it doesn't work 100%. So I'd be grateful for any suggestions.
Select Item In Combobox
Hello,
I'd like to select a value in a combobox. The combobox is filled wirh an array, the second column contains the search string.
Code:
l = Me.cmbGB1.ListCount
For i = 1 To l
If Me.cmbGB1.List(i, 1) = 8000 Then Me.cmbGB1.List(i, 1).Select
Next
Combobox Item Select
Hello, I have a combo box with 5 items on it, how can i display text pertaining to the select item in a text box when the user select's an item out of the combo box.
They click the wedge to drop down the 5 choices, and I want to be able to display information about their choice when they select it. I tried the change event, but that's only when you actually change the text of the box, I just want it to see when the text changes from Item1 to Item2. Is there any way of doing this without setting up a timer to constantly check the text in the box?
Thanks for any help. Appreciate it.
Select Item In ComboBox
How do I retrieve the "NAME" of the selected item in a combobox?
The selected item's Name will determine the items to be display in combobox2
Adding An Item To The Combobox At The Top
I guess that answered the original question, but lets add a twist.
I need to add to a list box where the newest data it put on top. When the newest data is on top, the exisiting info gets shifted down one space(index).
I am recording baseball scoring events. When something happens, that event is at the top of the list box, then previous events will be listed below it. [Sort by newest event] I do not have items for the list box al at once, they will be added periodically.
I was hoping I could just set the list box behavior to somehow display it that way. Otherwise, I was going to add the newest event to the top with additem and a index of zero, then loop through all of the items of the listbox and add one to the index so they would shift down.
**************MORON ALERT*********************
When you add an item to index 0, all of the other items will be moved down. See what happens when you read? M S D N!
ComboBox Item Color
Anyone know how to set the color of a specific item in a combobox so each item's color will be set based on a set criteria? I'm using VB6 SP5.
Reselecting An Item In Combobox
I am writing a program where a procedure is launched after an element of the combobox is selected. Specifically, I let the user select a preset colour or choose "other". Other then launches a colour picker.
The problem is that if the user is to select "other" again, then the colour picker procedure will not run (i use the click event). In this case, the user has to select a different colour from the list before they are able to select other again.
Is there a way such that by clicking on the already selected "other" that I am able to launch my colour picker procedure?
Hope this is clear. Thanks very much.
CP
Report Item From Combobox
I have a problem that's probably a piece of cake for the experienced users.
It's a long time since I last worked with VB, so I dont remember how to do this.
I am making a small program that will choose 3 random items from a combobox when a button is clicked, and write each chosen item in 3 text boxes.
The problem is that I cant figure out how to make the program write the chosen items in the text boxes. I tried using the online MSDN library, and not a single code they have for VB works...(atleast for my vb6) I've tried toying around with it in many ways, but Im stuck.
This is what I have:
Code:
Private Sub suggest_Click()
Dim random1 As String
Dim random2 As String
Dim random3 As String
Dim count As Integer
count = list1.ListCount
Randomize
random1 = CInt(Int((count * Rnd()) + 1))
random2 = CInt(Int((count * Rnd()) + 1))
random3 = CInt(Int((count * Rnd()) + 1))
i1.Text = random1
i2.Text = random2 '(these are just to check that the random values work, )
i3.Text = random3 '(which they do)
idea1.Text = list1.Item(random1)
idea2.Text = list1.Item(random2)
idea3.Text = list1.Item(random3)
End Sub
What am I doing wrong?
Adding An Item To The Combobox At The Top
Hi all,
When I am adding items to a combo box, it adds them to the bottom of the list. Is there a way to add the items at the top of the list instead? So instead of:
Code:
1
2
3
4
5
I would have:
Code:
5
4
3
3
2
1
Thanks!
Combobox Need To Have Item Selected
I have a combo Box and for it to go to next form I want an Item in the combobox to be selected but if nothing is selected then display an error below is my current code but it dosent work
Private Sub cmdAdd_Click()
Product = txtpCode.Text
If cmbColour.Text = "" Then
lblError.Caption = "Select a Colour"
Else
Colour = cmbColour.Text
End If
frmBasket.Show
frmShop.Hide
End Sub
Default Item Combobox
Hi all
When building a style 2 combobox, when I go to runtime I want to set a default list item. How do I do this? At the moment, I have 10 items in my list, but when I first run my program I have to select one first, otherwise the combo box is empty.
Any help would be great
TFC
Renaming An Item In A Combobox
Hi,
i want to do such thing:
i select an item in a combobox then push a button, which opens an input box, which renames the selected item in the combobox. how to do that?using additem, removeitem doesn't helps, because it puts the "renamed" item at the end of the list. how to rename an item without changing it's possition?
Selecting A Item From A ComboBox
Hi,
I have a form which allows users to enter details and save them to a table in a access database. Users use a mix of text boxes and ComboBoxes to enter the required data.
I have comboboxes which pull data from two lookup tables and insert the ID of their selection in the table which is great.
The problem comes when I come back to this form to view the entered data.
Both the ComboBoxes are empty. How can I get the ComboBoxes to set their default value to match that of their corresponding value in the table.
Heres my code so far:
Quote:
Private Sub Form_Activate()
'On Error GoTo errHandler
Dim sSql As String
Dim adoRSA As ADODB.Recordset
Dim adoField As ADODB.Field
Dim lCol As Long
Dim lRow As Long
Dim lWidth As Long
Dim labEntry As Label
Dim txtEntry As TextBox
Dim vArr As Variant
Dim lX As Long
Dim sHide As String
If Me.Tag = "loaded" Then Exit Sub
Me.Tag = "loaded"
Me.Icon = frmAccount.Icon
'txtEdit.Visible = False
'load IP details
sSql = "SELECT IPdetails.* " & _
"FROM IPdetails WHERE Clis = " & glCli
Set adoRS1 = gadoConnDB.Execute(sSql)
If Not adoRS1.EOF Then
'If adoRS1(tickProgrammed.DataField) Then
'tickProgrammed.Value = 1
'Else
'tickProgrammed.Value = 0
'End If
For Each txtEntry In txtIPDetails
txtEntry.Text = adoRS1(txtEntry.DataField)
'If tickProgrammed.Value Then
'txtEntry.BackColor = &H8080FF
'Else
'txtEntry.BackColor = &H80000005
'End If
Next
'framePBX.Tag = .TextMatrix(.Row, 2) 'save lCli
Else
For Each txtEntry In txtIPDetails
txtEntry.Text = ""
txtEntry.BackColor = &H80000005
Next
'tickProgrammed.Value = 0
'framePBX.Tag = .TextMatrix(.Row, 2) 'save lCli
End If
Dim strSQL As String 'Declare the variables we need
'Load the data
'** change this SQL to load the data you want.
strSQL = "SELECT * FROM PackageType"
'** change oConn to the name of your Connection object
Set adoRScombo1 = gadoConnDB.Execute(strSQL)
'Fill the combo box (or ListBox)
'** change the name of the combo to the one you want to fill
With CboPackageType
.Clear
'Do While Not adoRScombo1.EOF
'** change the name of the field here to the one you want to show
'.AddItem adoRScombo1.Fields("Package").Value
'adoRScombo1.MoveNext
Do Until adoRScombo1.EOF
CboPackageType.AddItem adoRScombo1.Fields("Package").Value & ""
CboPackageType.ItemData(CboPackageType.NewIndex) = adoRScombo1.Fields("PackageId").Value
adoRScombo1.MoveNext
Loop
'If CStr(CboPackageType.ItemData(CboPackageType.NewIndex)) = CStr(adoRS1("Package")) Then
'CboPackageType = True
'Else
'End If
End With
'Tidy up
adoRScombo1.Close
Set adoRScombo1 = Nothing
Dim strSQL2 As String 'Declare the variables we need
'Load the data
'** change this SQL to load the data you want.
strSQL2 = "SELECT * FROM ProviderName"
'** change oConn to the name of your Connection object
Set adoRScombo2 = gadoConnDB.Execute(strSQL2)
'Fill the combo box (or ListBox)
'** change the name of the combo to the one you want to fill
With CboProviderType
.Clear
'Do While Not adoRScombo2.EOF
'** change the name of the field here to the one you want to show
'.AddItem adoRScombo2.Fields("Provider").Value
'adoRScombo2.MoveNext
Do Until adoRScombo2.EOF
CboProviderType.AddItem adoRScombo2.Fields("Provider").Value & ""
CboProviderType.ItemData(CboProviderType.NewIndex) = adoRScombo2.Fields("ProviderId").Value
adoRScombo2.MoveNext
Loop
End With
'Tidy up
adoRScombo2.Close
Set adoRScombo2 = Nothing
End Sub
Private Sub cmdUpdateContact_Click()
Dim sSql As String
Dim adoRS1 As New ADODB.Recordset
Dim txtEntry As TextBox
'update ip data
sSql = "SELECT IPdetails.* " & _
"FROM IPdetails WHERE Clis = " & glCli
adoRS1.Open sSql, gadoConnDB, adOpenStatic, adLockOptimistic
If adoRS1.EOF Then
adoRS1.AddNew
End If
adoRS1("Clis") = glCli
adoRS1("Package") = CboPackageType.ItemData(CboPackageType.NewIndex)
adoRS1("Provider") = CboProviderType.ItemData(CboProviderType.NewIndex)
'If tickProgrammed.Value = 0 Then
'adoRS1(tickProgrammed.DataField) = False
'Else
'adoRS1(tickProgrammed.DataField) = True
'End If
For Each txtEntry In txtIPDetails
adoRS1(txtEntry.DataField) = Trimmer(txtEntry.Text)
Next
adoRS1.Update
cmdUpdateContact.Enabled = False
End Sub
Combobox With Tooltips For Each Item
how can i display tooltips for each of the item in the list of the combobox when i hover my mouse to each of the items? example like in the link below but its in visual c++
http://www.codeguru.com/cpp/controls...cle.php/c4949/
please kindly point me a direction if any of you know how to do this. thanks
How To Invisible Combobox Item?
I have this items in my combo box. I just want to show only this items
Combo1.AddItem "Tukar kata laluan" and invisible the others. How to do that?
Code:
Combo1.AddItem "Kemas kini maklumat pemilik lot"
Combo1.AddItem "Kemas kini maklumat perosak"
Combo1.AddItem "Kemas kini maklumat Penyakit Padi"
Combo1.AddItem "Kemas kini Sistem Pengkodan"
Combo1.AddItem "Mencetak maklumat pemilik lot"
Combo1.AddItem "Modelling"
'Combo1.AddItem "Merge data"
Combo1.AddItem "Tukar kata laluan"
Combo1.AddItem "Mencetak Sistem pengkodan"
Selected Item Of Combobox
In VB 2005 it is cboServer.SelectedItem, but how can I find he selected item of an combobox in vb 6.0 ?
Combobox: Error With 1st Item!
I have a combo box, which displays the name, and the ID of the chosen name appears in text box.... this all works fine apart from the 1st item in the combo box..it comes up with sql server syntax error, and pointt at the rs.open line!!!
wot is wrong??
Highlight Item In ComboBox? !!!
I know that I can use .Selected(0) in a listbox, but I need to do the same thing in a ComboBox. I set the .ListIndex and .TopIndex to 0, but the item isn't selected (highlighted). I want it to be visible on the screen.
What am I overlooking? There is no .Selected property!
ComboBox Item Expansion
I have a combobox that due to screen real estate in not wide enough to display the full text of the items. Is there a way to do something like tooltips that when the mouse is over an item that a small popup will appear displaying the full item text??
Storing A Key With Each Item In ComboBox In .NET
Hello Everyone,
I'm using .NET for the first time, and had a question. When I populate my combo box with database values, I was hoping to store the record key with each item so I could then determine which specific record the user chose. I'm trying to avoid binding directly to the database, although why I'm not sure so if you can convince me that's the way to go I will.
Otherwise, I was hoping there would be a tag property or something, but there isn't. Any suggestions?
Thanks!
-Ben
|