Add MenuStrip

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
albaek75
Posts: 14
Joined: Tue Aug 30, 2011 2:09 am

Add MenuStrip

Post by albaek75 » Tue Aug 30, 2011 2:09 am

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
Joined: Thu Aug 18, 2011 4:56 am

Add MenuStrip

Post by davidc » Tue Aug 30, 2011 3:51 am



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
Joined: Tue Aug 30, 2011 2:09 am

Add MenuStrip

Post by albaek75 » Tue Aug 30, 2011 4:46 am

Thanks that did it. Sometimes you just get stuck ;-)