Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Extended Listview Control -- Dropdown list

Posted on 2004-04-12
4
Medium Priority
?
583 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 375 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

886 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