Add MenuStrip

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
albaek75
Posts: 14
Last visit: Tue Apr 19, 2016 11:01 pm

Add MenuStrip

Post by albaek75 »

Hi Sapien I am trying to add menu items to my form, but I need som help. I add the menustrip, and som text, but how do I add code to menuitems. fx. I want the exit menu item to do a " $MainForm.close() " when I click it.I am using version 2.0.6uploads/26892/30-08-2011_15-59-27.png
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Add MenuStrip

Post by davidc »



To add
an event (script block) to the menu item you can do either of the following:

Option
1: Select the menu item. Go to the Property Pane press the Events button (lightning
bolt icon) and add an event by typing a name or double clicking on the "Click" event.



Option
2: This is the easiest method. Double click on the Menu Item and it will automatically create the default
event. In this case the default event is the "Click" event.



You
may want to take a look at the Tic Tac Plebius example. It utilizes a menu strip
as well.



David

David
SAPIEN Technologies, Inc.
User avatar
albaek75
Posts: 14
Last visit: Tue Apr 19, 2016 11:01 pm

Add MenuStrip

Post by albaek75 »

Thanks that did it. Sometimes you just get stuck ;-)
This topic is 12 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.