Checkmark in Dropdown List Style Combobox 
Author Message
 Checkmark in Dropdown List Style Combobox

I'd like to include a checkmark next to some items in a
combobox styled as a dropdown list. Is there any way to do
this?

Greg
----
greg -at- spencersoft -dot- com



Thu, 28 Jul 2005 12:45:18 GMT  
 Checkmark in Dropdown List Style Combobox
Here are a couple things that may help...

Substituting a Tabbed ListBox for a Combo's Dropdown List
http://www.mvps.org/vbnet/index.html?code/subclass/combotabbedlist.htm

Substituting a ListView for a Combo's Dropdown List
http://www.mvps.org/vbnet/index.html?code/subclass/combolistview.htm

ComboPlusCTL
http://www.vbsight.com/MultiColumn.htm

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com/ - Please keep it in the groups



Quote:
> I'd like to include a checkmark next to some items in a
> combobox styled as a dropdown list. Is there any way to do
> this?

> Greg
> ----
> greg -at- spencersoft -dot- com



Thu, 28 Jul 2005 13:22:49 GMT  
 Checkmark in Dropdown List Style Combobox


Quote:
> Here are a couple things that may help...

> Substituting a Tabbed ListBox for a Combo's Dropdown List
> http://www.mvps.org/vbnet/index.html?code/subclass/combotabbedlist.htm

Thanks for that link. I had checked that site before
posting my question, but didn't see that that article would
help much. After looking at it more in depth, I see that it
gets me a little closer to what I want.

Following the example in that article, I can substitute a
tabbed listbox for the dropdown box in a combo. For my
purposes, I would like to use tabs. Unfortunately, getting
a checkmark is more important to me. Right now I'm using
the letter "x" to indicate items that should be checked. I
could use a checked listbox, but I don't want the
checkmarks to be directly editable by the user. If I could
change fonts, I could get the checkmark from Wingdings.
Unfortunately, I can't do that.

So, any other suggestions about getting a checkmark in a
dropdown combo would be appreciated.

Thanks again,

Greg
----
greg -at- spencersoft -dot- com



Fri, 29 Jul 2005 14:49:32 GMT  
 Checkmark in Dropdown List Style Combobox
Check out the second link Ken sent you.
You could, with a ListView for the drop-down, use an
ImageList control with  the ListView (a checkbox Image)
and toggle the image on/off as you see fit.

Also, you can programmatically keep the
user from checking a checkbox.

In ListView:
---------------
Private Sub ListView1_ItemCheck(ByVal Item As MSComctlLib.ListItem)
    If Item.Checked Then Item.Checked = False
End Sub

In ListBox:
---------------
Private Sub List1_KeyPress(KeyAscii As Integer)
    With List1
        If .Selected(.ListIndex) Then
            .Selected(.ListIndex) = False
        End If
    End With
End Sub

Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
    With List1
        If .Selected(.ListIndex) Then
            .Selected(.ListIndex) = False
        End If
    End With
End Sub



Quote:


> > Here are a couple things that may help...

> > Substituting a Tabbed ListBox for a Combo's Dropdown List
> > http://www.mvps.org/vbnet/index.html?code/subclass/combotabbedlist.htm

> Thanks for that link. I had checked that site before
> posting my question, but didn't see that that article would
> help much. After looking at it more in depth, I see that it
> gets me a little closer to what I want.

> Following the example in that article, I can substitute a
> tabbed listbox for the dropdown box in a combo. For my
> purposes, I would like to use tabs. Unfortunately, getting
> a checkmark is more important to me. Right now I'm using
> the letter "x" to indicate items that should be checked. I
> could use a checked listbox, but I don't want the
> checkmarks to be directly editable by the user. If I could
> change fonts, I could get the checkmark from Wingdings.
> Unfortunately, I can't do that.

> So, any other suggestions about getting a checkmark in a
> dropdown combo would be appreciated.

> Thanks again,

> Greg
> ----
> greg -at- spencersoft -dot- com



Fri, 29 Jul 2005 21:38:57 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Combobox (Dropdown List: Style=2)

2. ComboBox with Style set as DropDown List: Problem.

3. ComboBox - Dropdown List Style

4. VB6: ComboBox with .Style Dropdown List not maintaining .ListIndex setting

5. Dynamically creating combobox with Style=2 - Dropdown List?

6. ComboBox (Style -> Dropdown List) Change() event

7. ComboBox - Style 2 - Dropdown List

8. ComboBox: Style(2 - DropDown List), change value?

9. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

10. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

11. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

12. Key Press in ComboBox when style is DropDown is not working

 

 
Powered by phpBB® Forum Software