0

i use a scrollable form in visual studio 2022,also i use contextmenustrip.problem is when the form is long,contextmenustrip doesn't in right place in design time so i can't use it,it's mean i can't create toolStripMenuItem automatically and contextmenustrip stuck at bottom of form.

in below pictures you can see problem better:

contextmenustrip problem image

tree of controls

what should i do?

Saber
  • 27
  • 7
  • Why do you keep removing the image? – LarsTech Feb 11 '22 at 18:16
  • i can't see the image,can you? – Saber Feb 11 '22 at 18:17
  • Yes. Maybe just refresh the page? Maybe you can't see images from imgur.com, where it's linked from? – LarsTech Feb 11 '22 at 18:19
  • 1
    if you can see the image so there is no problem – Saber Feb 11 '22 at 18:21
  • Maybe OP means the contextstrip is in the tray at the bottom of the forms designer? – Caius Jard Feb 11 '22 at 23:14
  • @Saber open the Document Outline window (view menu,, other windows I think) and show us the tree of controls - I want to see where the CMS is in the hierarchy . – Caius Jard Feb 12 '22 at 07:06
  • @CaiusJard i added what you said – Saber Feb 12 '22 at 16:39
  • @JohnG i docked two tablelayoutpanel to top of the form and form is long, also i meant that contextmenustrip is unreachable at design time not runtime – Saber Feb 12 '22 at 16:44
  • Temporary set `AutoScroll = false` when you want to edit the CMS. – dr.null Feb 12 '22 at 18:05
  • @dr.null your right but i need a long form so i need autoscroll be available – Saber Feb 12 '22 at 18:32
  • `true` it back when you finish editing the CMS? – dr.null Feb 12 '22 at 18:37
  • 1
    @dr.null when i set autoscroll of form to false,contextmenustrip stay at bottom of form(According to the image I posted) and getting unreachable – Saber Feb 13 '22 at 11:13
  • Yes you're right. In this case, use the CMS items editor to create the menu. Select the CMS, hit F4 to switch to the Properties window, the `Items` property (default) is selected, click the `...` button to open the editor, add/remove/move items and set their properties in there.... – dr.null Feb 13 '22 at 21:20

0 Answers0