| |

VerySource

 Forgot password?
 Register
Search
View: 823|Reply: 5

How to insert a menu into the Combobox or Textbox when you click the right mouse button

[Copy link]

2

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-21 21:00:01
| Show all posts |Read mode
How to right click on Combobox or Textbox
pop up
  Revoke
-----------------
  Cut
  copy
  Paste
----------------
  

How to patronize here Add a self menu
Event response
Experts help the younger brother

Thanked
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-31 13:18:01
| Show all posts
web or winform
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-31 23:36:01
| Show all posts
Add a contextstrip control and edit it according to your requirements, and then specify the control's contextmenustrip property of the control that needs to pop up the menu.
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-2 07:00:01
| Show all posts
Point contextmenu1 to the control you want
1 ContextMenu1.MenuItems.Add (New MenuItem ("Copy", New EventHandler (AddressOf aa))) 'aa is the corresponding event
ContextMenu1.MenuItems.Add (New MenuItem ("Delete", New EventHandler (AddressOf bb)))) ’bb is the response event
2 Writing response events
private sub aa (byval sender as object, byval e as system.EventArgs)
'Compose what to do when you click "Copy"
end sub

private sub bb (byval sender as object, byval e as system.EventArgs)
'Compose what to do when you click "Delete"
end sub

Haha, hope i can help you
Reply

Use magic Report

1

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-2-5 20:00:02
| Show all posts
contextmenu
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 Invalid IP Address

Post time: 2020-2-6 14:15:02
| Show all posts
Create a new ContextMenu control and select the ContextMenu on the contextMenu property of the textbox or comboBox
Next code the ContextMenu to implement the corresponding function
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list