Solved

Extended Listview Control -- Dropdown list

Posted on 2004-04-12
4
530 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 code to programmatically convert pdf to excel 21 66
VBA open file from excel cell 4 36
VB6 Compile Compatibility Issue 4 87
Copy a row 12 57
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

929 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

7 Experts available now in Live!

Get 1:1 Help Now