ComboBox Question (VB.NET 2008)

T

Tim Munro

Hi all,

I have a combobox set up fully populated with department names. I have
the AutoCompleteMode set to SuggestAppend and the AutoCompeteSource set to
ListItems. When I start typing, the appropriate list of possible matches
comes up (quite neat actually). When I cursor through that suggest list list
OR click to select an item, the main text field is updated, but I cannot
find which event is triggering (if any). I would like to be able to update
another textbox with information as I cursor up and down through the
"suggest" list, without actually having selected anything yet. Is this
possible?
 
C

Clive Lumb

Tim Munro said:
Hi all,

I have a combobox set up fully populated with department names. I have
the AutoCompleteMode set to SuggestAppend and the AutoCompeteSource set to
ListItems. When I start typing, the appropriate list of possible matches
comes up (quite neat actually). When I cursor through that suggest list
list OR click to select an item, the main text field is updated, but I
cannot find which event is triggering (if any). I would like to be able to
update another textbox with information as I cursor up and down through
the "suggest" list, without actually having selected anything yet. Is this
possible?

Try the "TextChanged" Event
 
T

Tim Munro

Cor,

I don't follow your question. The program is an Account Management
system I am writing for our service desk. As they scroll through the
possible entries on the combobox list, other information on the form needs
to be updated even before final selection.

--
Tim.

Cor Ligthert said:
Tim,

Do you have any idea how the user should do that?

Cor
 
T

Tim Munro

I have tried: TextChanged, TextUpdate, SelectedIndexChanged,
SelectedValueChanged, various Mouse events, all to no avail.

For example, when I start typing, let's say I type a "G". All departments
starting with "G" show up in a little completetion list. As I move the
cursor up and down through that list do any events trigger?
 
C

Clive Lumb

Tim Munro said:
I have tried: TextChanged, TextUpdate, SelectedIndexChanged,
SelectedValueChanged, various Mouse events, all to no avail.

For example, when I start typing, let's say I type a "G". All departments
starting with "G" show up in a little completetion list. As I move the
cursor up and down through that list do any events trigger?

It does here!
However it does not trigger on mouse movements, only on arrow keys
 
C

Cor Ligthert[MVP]

Tim,

As you use a datatable and use that as datasource from your combobox, then
you can bind every textbox to the same table.

The currencymanager will then automaticly do this for you.

http://www.vb-tips.com/CurrencyManager.aspx

Here is a datagridview used, however for this it is with a combobox the
same.

I had understood your first message completely diffferent from this.

Cor
 
J

James Hahn

As you will need to retrieve the current autocomplete item, as well as
firing an event when the current item changes,
it seems that the only solution is to create your own autocomplete function
using a listbox popped up below the combobox. Then you can use a combination
of listbox and combobox events and properties to drive the textbox updating.
 
T

Tim Munro

Unfortunately I'm not using any kind of data table. The data comes from a
CSV file, and is held in an array of a user-defined structure data type.

Cor Ligthert said:
Tim,

As you use a datatable and use that as datasource from your combobox, then
you can bind every textbox to the same table.

The currencymanager will then automaticly do this for you.

http://www.vb-tips.com/CurrencyManager.aspx

Here is a datagridview used, however for this it is with a combobox the
same.

I had understood your first message completely diffferent from this.

Cor
 
T

Tim Munro

Thanks James. That may not be worth the effort. Everything is updataed
properly when the combobox loses focus. I was just hoping to have it a bit
more dynamic. Spiffy and all that.

--
Tim.

James Hahn said:
As you will need to retrieve the current autocomplete item, as well as
firing an event when the current item changes,
it seems that the only solution is to create your own autocomplete
function using a listbox popped up below the combobox. Then you can use a
combination of listbox and combobox events and properties to drive the
textbox updating.
 
C

Cor Ligthert[MVP]

Tim,

Any reason that you are not using a datatable.

I probably have not all information, but what you write looks for me as
somebody who is using a plane to go to his neighbour in Harlem.

Cor

Tim Munro said:
Unfortunately I'm not using any kind of data table. The data comes from a
CSV file, and is held in an array of a user-defined structure data type.
 
T

Tim Munro

The data is fair static. There are only 110 or records and I think changing
it over to database is adding an unnecessary complexity to the whole system.
 
C

Cor Ligthert[MVP]

A datatable is not a database.

It is just a dataclass that fits the best with Net DataControls like the
Combobox.

It has nothing to do with a database beside the fact that it has the same
aspects as a database table.

Cor
 

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