Combo Box Auto-expanding
Hi, I have a combo box that is loaded with a list of values Certain values are lengthy that am not able to see them. How should i make my combo box auto-expand its width to see contents.. plz help!!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Auto Expanding TreeNode
hi, there, I am implementing the drag & drop from the TDBGrid to Treeview control, does anyone know how to expand treeNode automatically when the dragged item is on the Treenode before the mouseUp event is triggered ????
thx a lot in advance!
Combo Box Auto Search
I got a combo box and it is linked to a table full of employee's details. what i need it to do is when i scroll the list and find the employee and click on it, display the information about him within the form.
Newbie question, but i am a newbie tbh
Any help is most welcome
Combo Box Auto Drop
Hi everybody,
I am a newbie at this so please be patient. I have a combo box that gets populated with names of customers from the CUSTOMER table from an access database. What I want the user to be able to do is that when they type a last name in that combo box, the combo box automatically drops open and start scrolling to the matching last name. So far I have a List box performing this action and its working like a charm. But my client wants a combo box to save some space in stead of a list box.
I have tried posting this question in Microsoft Knowledge Newsgroups and received an answer. The person gave me a link to a website that allowed me to download a VB project that does exactly what I need to do. But the code in that project is extremely complex. Being a Newbie that I am, I have no idea how to decipher it. Can anyone give me a better solution to my problem? I'd much appreciate it.
Thanks
Combo Box Auto Fill
I'm surprised i couldnt find the answer to this in the forum. Maybe i'm searching wrong..
But I'd like to know what I need to do to get a combo box to automatically fill in as you press keys.. such as
If i have a combo box with AM and PM in it, if i press A, I want it to go to AM if I press P, it brings in PM for me..
Is there a property to set I'm overlooking? i know it's got to be a really simple thing, but I can't seem to find it.
Thanks.
Combo Auto Search
with combo1
.additem "One"
.additem "Two"
.additem "Three"
end with
when i type "T" in combo box, the word "Three will be display and the "hree" is highlited?
how can i do that?
Combo Box Auto Complete
i have combo box with multiple values , i want when i enter one character to complete automaticaly the nearest available entry and if i type one more character it will match the next and so on
thanks
Combo Box Auto List
How do i list whatever was in the combox without clicking on the small arrow?
I want when the user lunches the program , the drop list to be already opened?
Help?
Combo Box Auto Display
Example: in the combo box I have listed the following:
1: BOOK
2: TV
3: CAR
Now , when I type (1) in the combo text box , and press enter , I want the list to automatically search for that id and display it.
I don't want to use any kind of loop because I think the combo box can do it automatically! Try this , type number 1 in the combo text box and click on the list arraw and it will go directly to the item which starts with number 1.
Auto Complete Combo Box
Can anyone tell me a code of Auto Completing the combo box list. I mean as soon as user start typing in the combo box, it shoud bring the releted item.
Thanks in advance
Auto-completing Combo Box
I found this function somewhere a while ago;
Stick this in a module;
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const CB_FINDSTRING = &H14C
Const CB_ERR = (-1)
Public Function AutoFind(ByRef cboCurrent As ComboBox, ByVal KeyAscii As Integer, Optional ByVal LimitToList As Boolean = False)
Dim lCB As Long
Dim sFindString As String
On Error GoTo Err_Handler
If KeyAscii = 8 Then
If cboCurrent.SelStart <= 1 Then
cboCurrent = ""
AutoFind = 0
Exit Function
End If
If cboCurrent.SelLength = 0 Then
sFindString = UCase(Left(cboCurrent, Len(cboCurrent) - 1))
Else
sFindString = Left$(cboCurrent.Text, cboCurrent.SelStart - 1)
End If
ElseIf KeyAscii < 32 Or KeyAscii > 127 Then
Exit Function
Else
If cboCurrent.SelLength = 0 Then
sFindString = UCase(cboCurrent.Text & Chr$(KeyAscii))
Else
sFindString = Left$(cboCurrent.Text, cboCurrent.SelStart) & Chr$(KeyAscii)
End If
End If
lCB = SendMessage(cboCurrent.hwnd, CB_FINDSTRING, -1, ByVal sFindString)
If lCB <> CB_ERR Then
cboCurrent.ListIndex = lCB
cboCurrent.SelStart = Len(sFindString)
cboCurrent.SelLength = Len(cboCurrent.Text) - cboCurrent.SelStart
AutoFind = 0
Else
If LimitToList = True Then
AutoFind = 0
Else
AutoFind = KeyAscii
End If
End If
Err_Handler:
End Function
Then, in the KeyPress event of the combobox in question - do this
Code:
Private Sub cboText_KeyPress(KeyAscii As Integer)
KeyAscii = AutoFind(cboText, KeyAscii, False)
End Sub
Auto Complete Combo Box
Hi,
At present this is what's happening. In VB6, i have a Databound combobox link to a SQL2000
database using Data Environment Object. When i clicked on the dataCombobox
and start typing in a character it should automatically complete theword
based on the data found in the DataCombo (same function for AutoExpandin access). For instance, i have 5 data "Jon,
Tom, Time, Mary, Jane" in the data. If i type "to" in the datacombo it
should automatically find the closest match (which it Tom, in this case)and
display it in the dataCombo.
Does anyone know there is a way to do it?
Thanks in advance.
Jonz
Combo Box Auto Select
Hi
I don't know if this is possible but here it goes. I have a combo box that I populate with a stored procedure. Here is the code. I would like to be able to auto select(as the user types in the box it finds the name ) but if I do so I can't get the list index of the item. I have to really click the selection to get the corresponding List Index. How would I get this to work?
Set rsPopulateRequestor = New ADODB.Recordset
rsPopulateRequestor.Open "spRequestorPopulate", Cn, adOpenForwardOnly
Do Until rsPopulateRequestor.EOF
cboRequestor.AddItem rsPopulateRequestor!LastName & ", " & rsPopulateRequestor!FirstName
cboRequestor.ItemData(cboRequestor.NewIndex) = rsPopulateRequestor!RequestorID
rsPopulateRequestor.MoveNext
Loop
Thanks in advance
Help With Combo Box And Auto Date In TextBox.
Hi,
Kind of new to VB. Learning as I go along here. Is there a way to have a textbox automatically enter in that day's date when opening that file?
Also I put some code in for a combo box in word. I used the control toolbox to place the combo box and then just added the items.
Private Sub Form_Load()
ComboBox2.AddItem "Yes"
ComboBox2.AddItem "No"
End Sub
That works fine when I run it but when I save and close the file and get back into it, the code is there but everything in the dropdown list is gone. Basically I want to create a template that others can use. Once they open up the file everything should up and running. Is there a way to design this and not use code? Am I just doing something wrong with the properties? Or is there another way to do it and keep the functionality saved. I remember with Outlook it had more of a properties menu feature that allowed me to do that without VB Code. I just started using Word for some VB and getting lost here.
Any help would be appreciated.
Thanks!
Generating Auto Items For A Combo Box
I have 2 comboboxes on a form. One combobox has "Master Room Suits" and "Standard Room" as its items. Now what I need to do is when the user selects master room suite, the second combobox creates items labelled 1 to 5 . and standard room as 1 to 8. Does n e 1 know how to do this????
Auto Complete Data Combo
Hello everyone.
I was wondering if anyone knows how I can get the Data Combo control to do type ahead. It kind of does it now, but instead of displaying what the user is typing and highlighting the matched entry it highlights the whole word. It also looses what the user types after a few seconds. This makes it hard to use. I need to use the data combo, because I am binding it to an ADO recordset. I figured out how to get this functionality to work on a regular combo using the API, but I can't bind the regular one to a recordset. I am open to buying a third party control if anyone knows of one that will serve my needs.
Thanks
Auto Display Text In Combo Box
OK, I would like to have a combo box containing all the states. When the user starts to type, it will pull up the closest state that matches the text he is typing in.
Example:
User hits "M" and the first state listed with "M" would be displayed "Maine". User Continues to type "MAS" and Massachusetts" would be displayed next. User Types "MASA" and nothing is displayed I think you get the idea, Right? LOL
So how can I do this? Is there an easy or standard way this is done?
Thanks for reading this.
Combo Box Auto Selection Of Item At Start
I have a combo box that is set to dropdown list(so read only) and a couple of records in it. Now the problem is that when i start the program there is no field selected in the combo box and i need to select a filed by hand, but i want the first field to be selected at start(or could be any other field)
How do i do this?
Thx
Auto-complete Feature In VB Combo Boxes
In access, when making forms, you can add combos boxes.
then if you type in the combo box, it automatically completes what you ar typing.
eg, if there is a value 'forest' in the combo box, as you type 'f' the word forest will appear. you can then enter or tab out of the combo box to accept that value. otherwise, you can keep typing over it.
anyone know how to replicate this in VB?
Populate Combo Box && Auto Complete For US States
Should you put the code in the program to populate a combo box or should you have it reference a table or do it another way?
For example lets say you have a combo box that is going to list the abbreviations for all the states in the U.S. Do you .AddItem for each 50 state abbreviation? Or should you just write them in a small table and have the program reference the table to fill the combo box?
I'm just curious as to which would be better so as not to slow my program. Or, if there is another option that would be helpful as well.
Auto Combo Box Creation In MS Word Tables
Hi,
I have a project on that requires automating the creation of combo boxes in the third column of
each and every row in all tables within an MS Word 2000 document.
While each combo box bookmark is to be uniquely named within the code (using something along the lines of Status"&xVal, the values of the combo list are the same 6 or 7 text stringsin the document.
Not being a VBA expert, any help here will be greatly welcomed.
Thanks kindly,
Ozzie
Combo Box Auto Complete (and The Ability To Correct Typos)
I am using the code by Comintern in the following link to auto complete a combo box
http://www.vbforums.com/showthread.p...ight=Combo+Box
The code works beautifully except that if I type the letter J instead of K it will not allow me to backspace. Anybody have any ideas how to fix this.
I really have not had a change to figure something out yet.
Thank You
Auto Complete Text Box Or Combo Box In Visual Basic 6
Some boddy do good for me
First Letter:
d brings up Doctor Dave and looks like this Doctor Dave with the current cursor position on "o", now when the next letter o
is entered you would still get the almost the same thing except that highlight would now start on the "c", then by press the letter n, it would now show Don Newbie with the highlight and current sursor position on the space.
Windows XP Messenger it best example of this.
Same Thing in working In Internet Explorer, here is a Example enclosed
Edited by - Venoms on 3/18/2003 3:08:13 AM
Combo Box (extended Matching) Auto Select Not Functioning. **RESOLVED**
OK going nuts here, I know this should work, did alot of digging around here and came up with all these solutions of how to get a combo box to auto complete or search text. IE
Entries in combo box:
Andrew
Billy
Bina
Bob
Byrn
Sam
the user pressed B and it selects Billy since its the first B, then the user presses o and it moves down to bob in the list etc..
Well from all the digging i do, these next two examples of code should work.
EXAMPLE1:
VB Code:
'DeclarationsPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst CB_ERR = (-1)Const CB_FINDSTRING = &H14C Private Sub Combo1_KeyPress(KeyAscii As Integer) Dim CB As Long Dim FindString As String If KeyAscii < 32 Or KeyAscii > 127 Then Exit Sub If Combo1.SelLength = 0 Then FindString = Combo1.Text & Chr$(KeyAscii) Else FindString = Left$(Combo1.Text, Combo1.SelStart) & Chr$(KeyAscii) End If CB = SendMessage(Combo1.hWnd, CB_FINDSTRING, -1, ByVal FindString) If CB <> CB_ERR Then Combo1.ListIndex = CB Combo1.SelStart = Len(FindString) Combo1.SelLength = Len(Combo1.Text) - Combo1.SelStart End If KeyAscii = 0End Sub
EXAMPLE 2:
VB Code:
'In keypress of combobox KeyAscii = AUTOFIND(Me.Activecontrol, KeyAscii, True) ' The Decalarations Private Declare Function SendMessage Lib "user32" Alias _ "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long Const CB_FINDSTRING = &H14CConst CB_ERR = (-1) ' The Function '*******************************************************************************' AUTOFIND (FUNCTION)'' DESCRIPTION:' AUTOCOMPLETE A COMBOBOX (WORKS !!!)'******************************************************************************* Public Function AUTOFIND(ByRef cboCurrent As ComboBox, _ ByVal KeyAscii As Integer, Optional ByVal LimitToList As Boolean = False) Dim lCB As Long Dim sFindString As String If KeyAscii = 8 Then If cboCurrent.SelStart <= 1 Then cboCurrent = "" AUTOFIND = 0 Exit Function End If If cboCurrent.SelLength = 0 Then sFindString = UCase(Left(cboCurrent, Len(cboCurrent) - 1)) Else sFindString = Left$(cboCurrent.Text, cboCurrent.SelStart - 1) End If ElseIf KeyAscii < 32 Or KeyAscii > 127 Then Exit Function Else If cboCurrent.SelLength = 0 Then sFindString = UCase(cboCurrent.Text & Chr$(KeyAscii)) Else sFindString = Left$(cboCurrent.Text, cboCurrent.SelStart) & Chr$(KeyAscii) End If End If lCB = SendMessage(cboCurrent.hwnd, CB_FINDSTRING, -1, ByVal sFindString) If lCB <> CB_ERR Then cboCurrent.ListIndex = lCB cboCurrent.SelStart = Len(sFindString) cboCurrent.SelLength = Len(cboCurrent.Text) - cboCurrent.SelStart AUTOFIND = 0 Else If LimitToList = True Then AUTOFIND = 0 Else AUTOFIND = KeyAscii End If End If End Function
END EXAMPLES
However. when i run this I get errors on the .SelLength. The exact error is.
Run time Error 380:
Invalid property value
Anyone have any idea why?
Do i need any references etc. setup?
VB's auto code recognition stuff sees that as an option, IE when i type combo1. the drop down list after the period shows SelLength as an option.
Pulling my hair out here, anyone have any ideas?
Thanks in advance for any assistance you can provide.
PS: yes i changed all the combo1's to the name of my combo box
Expanding A RTB
How do you make it so that if you maximize your form that the rich text box while expand with it?
Expanding A TextBox
Hello All,
Is there a way to expand a textbox to fit the string of text typed in by the user? I don't like the scroll bar effect when a user inputs text that goes beyond the size of the textbox and hoped this would be a viable option.
Need Help Expanding Desktop...
I am looking for a way to expand the Windows desktop. I suspect that this would be an API call, but am not sure. I want to create a zoomable desktop that can be magnified up to 40 times or so, and a smaller window that moves about in this magnified area. The mouse and all programs would work normally, the only difference is that you would see only the "zoomed" portion of the screen. Using a form and bitblt'ing to a picture box will not work as the form will not magnify beneath itself (I don't think there is a way to do that, is there?) and the mouse and desktop does not work normal when the desktop is covered by the form.
I think that if the desktop size were increased, with the video information made larger to cover the expanded desktop, then this may work. Or possibly making the area sent to the desktop smaller, but keeping the screen resolution the same sime. Not sure how to do it.
Any ideas?
This application would be used to help the visually impaired.
Thanks for your help.
Mike
mr.robertson@worldnet.att.net
Help With Expanding Arrays
I've go one 2D array and one 1D array that I've declared as dynamic. I'm getting an "exceeded bound" error with the 2D, but I don't get an error using the same technique in the same code with the 1D array (tested independently)...see below. I am using this within VBA, but it seems that I don't understand the pure VB. Please help.
These are, from what I can tell, the applicable lines. Please let me know if you need more context.
Dim ToolInfo() as String
Dim ToolInfoIndex() as Integer
.
.
.
ReDim ToolInfo(1 to 1, 1 to 3)
ReDim ToolInfoIndex(1 To 1)
.
.
.
Do Until x > 37
tmp = Cells(x, 7).Value
If tmp <> "" Then
NewUpperInfo = UBound(ToolInfo) + 1
NewUpperIndex = UBound(ToolInfoIndex) + 1
ToolInfo(v, 1) = tmp
ToolInfoIndex(v) = x
ToolInfo(v, 2) = Cells(x, 10).Value
ReDim Preserve ToolInfo(1 To NewUpperInfo, 1 To 3)
ReDim Preserve ToolInfoIndex(1 To NewUpperIndex)
v = v + 1
End If
x = x + 1
Loop
Expanding FlexGrid
I have a flexgrid on a vb 6.0 form. The grid has scroll bars on it, but if I Maximize the screen the grid stays at it original set size. Can anyone tell me how to set it so it will expand with the screen and still maintain the scroll bars?
--Thanks
--Jon
Expanding And Adding
Hi there!
I need a code which will do this:
Lets say I got a form, called Form1, and it changed sizes on a button click. Also, In this extra space now, It adds a internet browser and loads a page certain page, like themn.co.uk.
Any ideas?
All help is greatfully thanked for
-Neo
Expanding A Treeview
i have a treeview that is likely to be filled with a lot of nodes, so, instead of looping round, adding all the nodes at once, how can i do it so that it'll only get the child nodes of the node you've just expanded? i know you can put some code in the Expand event, but if i don't already have those child nodes there, there's no + sign for the user to click on to expand it.
Expanding My Universe
Hi All!
Can anyone suggest a good book to learn about Windows Operating Systems (DLL's, Registry, etc) ?
I know VB6, some ASP and .Net stuff but am a little deficient when it comes to knowing about the "innards" of the Windows OS.
Thanks!
AMACycle
American Motorcyclist Association
www.ama-cycle.org
Expanding Wildcards
Hi,
I'm a VB Noobie and having some trouble trying to figure out how to expand wildcards I'm using in a comparison.
What I'm doing is reading a text file by line. And comparing the lines for a match. If there's a match I'd like to save part of the line, but not the entire line. The part(s) I'd like to save are the wildcards.
Here's my little snippet of code:
an incoming line would appear as:
(0): 4:51:25 COMPUTER: Prospected (1) Raw Acheronite.
----------
StringCompare = LineText Like "* COMPUTER: Prospected (*) *."
If StringCompare = True Then
Debug.Print LineText
----------
The comparison is working out fine, but I can't for the life of me figure out how to expand the wildcards so that I can save those particular strings for later use.
Any help appreciated. I did read about trying to use a percent (%) for a wildcard, didn't work for me at all.
Boso
Treeview Expanding
Hi,
Has anybody have any idea, how to expand/collase a treeview control nodes after adding a new node programmatically. I don't see any specific property or event that does that. Your help will be appreciated.
MSHFlexGrid Expanding After Refresh
I am using the code below to refresh the MSHFlexGrid on my form after the database has been updated. However after updating everything (+/-) is automaticaly expanded, so the bottom line of code collapses it all. I would though like the grid to look exactly the same as before it was updated, so that the grid does not expand or collapse while the user is looking at data. Can anybody help ?
MusicGrid.Redraw = True
Set MusicGrid.DataSource = Nothing
MusicGrid.Refresh
Set MusicGrid.DataSource = MusicData
MusicGrid.Refresh
MusicGrid.CollapseAll
Expanding Character Spacing
Is there any way to exapnd character spacing in textboxes in Access 97?
Im making a database for a person who is dyslexic and requires this sort of special formatting.
Self-Expanding MultiSelect ListBox In Vb6.?
Hello, I want to create a custom listbox allowing multiple selections in vb6 with a compact aspect (like a combobox). My pourpose is to automatically expand the height of the listbox on a click to show the items and wen you are finished selecting, the listbox is restored to its original compact one line height.
Please, it is possible to do in vb6? Can you help me with the code?
Thank you very much
Roderic, Barcelona.
Expanding All The Treeview Nodes
Is there a way to expand all of the treeview nodes at once?
Also, is there an easy way to move a node between parents?
This treeview must be the most difficult code I've tackled.
Expanding Certain Treeview Nodes
I have a program that loads all the directories of a hard drive
into a treeview. What i want to do when the form loads is to
have certain nodes already expanded according to a folder path.
Lets say my path is "C:WindowsDesktop", i would like to have
the nodes "Windows" and "Desktop" already expanded. Does anyone
know how to do this? I searched here for everything related to a
treeview but there just wasnt much info on this.
Recordset Object Expanding
Hi
I’m having serious problems with a Recordset object.
I have two related tables in a database. This relationship will carry out a cascading update on selected fields in the second table when the primary key is changed in the first.
The problem is this:
Prior to carrying out my SQL ‘Update’ query on the primay key in the first table, I execute a ‘Select’ query and assign the results to a recordset object. This recordset object is used in order to store the original primary key values from my first table.
This then helpsme to iterate through each row of the table updating each primary key with any new value.
However when I then try to carry out the ‘Update’ query on the pimary table, the recordset object appears to be acquiring the new ‘Update’ value alongside the original values from the ‘Select’ query.
In other words if I originally had two records in the first table, then the recordset object would be assigned these two values, giving a recordcount of two. However this recordcount is mysteriously changing to three after the first update.
This is causing me no end of grief as it is leading to the program crashing due to an attempt to store duplicate primary key values in the first table
I am at a complete loss and would be gratefull if anyone could shed any light on this.
Many Thanks
Collapsing/Expanding Functions
Hi there...
I've seen the nice feature in VB.NET where you can collapse (sort of minimize) the functions in the code window. Is it possible to implement this feature into ordinary VB (I'm using VB6 Ent)? Maybe as a downloadable add-on, or is it maybe possible to code it as a plugin?
Self-Expanding MultiSelect ListBox In Vb6.?
Hello, I want to create a custom listbox allowing multiple selections in vb6 with a compact aspect (like a combobox). My pourpose is to automatically expand the height of the listbox on a click to show the items and wen you are finished selecting, the listbox is restored to its original compact one line height.
Please, it is possible to do in vb6? Can you help me with the code?
Thank you very much
Roderic, Barcelona.
Expanding Tree View
This what my expanded TreeView(tvMonth) Looks Like
Jan - 2003
1
2
3
4
Initially the tree view remains closed, what i wanted is to expand the treeview & select "4" from the list On Form Load.
Help will be appriciated
|