Click to See Complete Forum and Search --> : combo box - pop up menu


batsheva
May 7th, 2001, 04:21 PM
When you right click on a combo box a menu pops up with the following. Undo,cut,copy,paste, delete, select all. i would like to add another item to that menu. Is it possible?
Also I put a message box in the double click event of the combo box and when i double click nothing happens. Can someone please help me out?

Thanks!!

Spectre5000
May 7th, 2001, 04:50 PM
As far as the popup menu - The menu that you are getting is the Windows Standard menu, and this popup menu comes up when you right click in Windows. You cannot change this menu, but you can build a popup menu of your own and have this override the windows standard. Basically, build a popup menu, and make the new one come up during the right click. As for the message box in double click on the combo box - you may have to eliminate that. The combo box may not recognize a double click event as when you single click the menu drops down, and then another click pulls the menu back up. Without seeing the code, though, I can't say for sure if a double click would work.

Cakkie
May 8th, 2001, 02:36 AM
I would like to add a note here, you can't trap the rightclick event of a combobox because of the lack of the MouseDown/MouseUp events.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

batsheva
May 8th, 2001, 06:55 AM
So there is no way to create a pop-up menu when you right click on a combo box?

Iouri
May 8th, 2001, 07:04 AM
Try this, may be it will help you

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

mnufile.Visible = False

If Button = 2 Then PopupMenu mnufile

End Sub


Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

mnufile.Visible = False
If Button = 2 Then PopupMenu mnufile

End Sub


Private Sub Label2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

mnufile.Visible = False
If Button = 2 Then PopupMenu mnufile

End Sub

' on different contro;s we can call different popup menus

Iouri Boutchkine
iouri@hotsheet.com