Solved

Extended Listview Control -- Dropdown list

Posted on 2004-04-12
4
534 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 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