Solved

Extended Listview Control -- Dropdown list

Posted on 2004-04-12
4
526 Views
Last Modified: 2013-12-25
Platform:  Visual Basic 6  (not vb.net)

I'm looking for a way to do a dropdown list with the listview control, much like the code at:

http://www.codeguru.com/Cpp/controls/listview/editingitemsandsubitem/article.php/c979

The sourcecode to something like this would be worth some bonus points from me:

http://vcreations.net/product.asp?pid=1

Basically, I need to allow users to enter text in a listview, but want to guide them to entering it from a predefined list.

Something like the Attendee list (w/o availability) in an Outlook Meeting Request is what I'm shooting for in the end.

Any help in pointing me in the right direction would be greatly appreciated.

0
Comment
Question by:leavinmate
  • 2
  • 2
4 Comments
 
LVL 27

Accepted Solution

by:
Dabas earned 125 total points
ID: 10811134
Hi leavinmate,
The basic idea is to have a "roaming" combobox that has its Visible property set to True most of the time.
Whenever the user click on a cell within the listview, your program will:
1) Determine the exact position and size of the cell
2) Move the combobox to said position
3) Make the box visible

Once the user has selected from teh combobox, you will:
4) Transfer the combo's text to the corresponding subitem
5) Hide the combobox

That is the first stage!
Let me know which one of the steps give you difficulties!

Dabas
0
 
LVL 1

Author Comment

by:leavinmate
ID: 10919140
Okay....

It took me awhile to get back to this feature, but how do you do the first part of getting the exact position and size of the cell.

0
 
LVL 1

Author Comment

by:leavinmate
ID: 10960012
http://www.scottandmichelle.net/scott/code/index2.mv?codenum=040

Here's how to do what I wanted with a text box instead of a combo box.  It's should be easy enough to make the change.

0
 
LVL 27

Expert Comment

by:Dabas
ID: 10963090
leavinmate:
Sorry I did not get back to you, but have been overwhelmed with work.
Looks like a good link you found there!
Thanks for posting it!

Dabas
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now