![]() |
| ||
| Adding controls into a ListView Greetings. I have searched high and low for the above topic but to no avail :confused: Is it possible to add a combo box into one of the columns of a listview control? Please advise. |
| ||
| Re: Adding controls into a ListView It is possible. Look into the API "SetParent" You might want to download the API-Guide Network. (Sorry, can't recall the URL off hand) |
| ||
| Re: Adding controls into a ListView Greetings. Hey, thanks so much for the "direction". Did a search in google and I guess I've got a rough picture already. I'll come back with codes when I'm stuck. ;) Thanks a lot! |
| ||
| Re: Adding controls into a ListView Greetings. Right, I have came up with a few lines of codes. I have 6 rows in the listview, and I need to add 1 comboBox to each row at subItem number 2. At runtime, I could see 1 comboBox at row 1. I guess all 6 combo boxes are piled up there. :D Do Until myRS.EOF = True How can I solve that? Please help. Thanks. |
| ||
| Re: Adding controls into a ListView Well, looks like you have the right idea for the SetParent API. In all honesty, I've never tried adding controls to a list view or anything else that has multiple places to put them (aside from a toolbar, but that's slightly different). You might try to find a way to address subItem2's handle. Every control in Windows has a control (or atleast has the opportunity to apply for one). If you want to think about it in a very basic concept, imagine everything is a picturebox, except not everything has a Picture property. From there, you can see that everything has a Height, Width, and Handle. Beyond that, the controls just add their own properties as needed. So if you can find a way to retrieve subItem2's hWnd, then you should be in business. |
| ||
| Re: Adding controls into a ListView Greetings. Ok, I got you. By the way, I could not fully understand wat does hWnd do. Could you please explain a little if possible? In addition, I tried using the combo box's Height property but there is an error stating that combo box's height is read-only, n thus I can't use that parameter to do things with it. I'm not modifying the parameter, but I just want that value. Please advise. |
| ||
| Re: Adding controls into a ListView Quote:
|
| ||
| Re: Adding controls into a ListView Quote:
|
| ||
| Re: Adding controls into a ListView Greetings. Thanks for the url, mnemtsas! Can't really get what you meant by this though:- Quote:
[1] Add a Check Box to the Left Hand Side of a Drop-Down Combo Box (Currently looking into this as I guess the concept is quite similar.) [2] Detect when a Combo Box Drops Down or Closes Up (This is indeed very confusing for me!) Cypher, thanks a lot for the explanation! Understood, but now's time to apply the theory (toughest part! :sad: ). |
| All times are GMT -4. The time now is 11:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC