{"id":2316,"date":"2010-08-03T08:31:00","date_gmt":"2010-08-03T16:31:00","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=2316"},"modified":"2010-09-21T01:09:57","modified_gmt":"2010-09-21T09:09:57","slug":"feature-peek-2011-visual-powershell-2011-creating-multiple-event-handlers-at-once","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2010\/08\/03\/feature-peek-2011-visual-powershell-2011-creating-multiple-event-handlers-at-once\/","title":{"rendered":"Feature Peek 2011: PrimalForms 2011 &ndash; Creating multiple event handlers at once"},"content":{"rendered":"<p>This month, we are looking at PrimalForms 2011 and how to add event handlers to form controls. After evaluating PrimalForms 2009\u00a0and user feedback, we decided to improve the process of adding event handlers in PrimalForms 2011. In PrimalForms 2009, you can create the default event by double clicking on the control or by using the \u201cEdit Default Event\u201d context menu option. But if you want to create a handler for a different event, you have to go to the Property Pane then click on the events button and then search for the event you wish to add. PrimalForms 2011 streamlines this process, thus making it faster and easier to add event handlers.<\/p>\n<p>In PrimalForms 2011 users have the ability to add any event handler by using the \u201cAdd Events\u201d context menu option in the Designer:<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/AddEventsMenuOption.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"Add Events Menu Option\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/AddEventsMenuOption_thumb.png\" border=\"0\" alt=\"Add Events Menu Option\" width=\"244\" height=\"169\" \/><\/a><\/p>\n<p><span style=\"font-size: x-small;\">(Fig 1: Use the \u201cAdd Events\u201d context menu option to add event handlers to any control.)<\/span><\/p>\n<p>In addition, PrimalForms 2011 offers the option to create multiple event handlers at once. To facilitate this, the application displays a list of available events in the Add Events Dialog. By\u00a0 simply checking the corresponding events in the dialog, a user can create multiple event handlers at one time.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/AddEventsDialog.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"Add Events Dialog\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/AddEventsDialog_thumb.png\" border=\"0\" alt=\"Add Events Dialog\" width=\"244\" height=\"169\" \/><\/a><\/p>\n<p><span style=\"font-size: x-small;\">(Fig 2: Add Event Dialog \u2013 Displays a list of available events. Hover the cursor over the event to display help information.)<\/span><\/p>\n<p>Once the Create Button is clicked, the application will automatically generate a new event block for each of the checked events.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/CreatedEvents.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"Created Events\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/CreatedEvents_thumb.png\" border=\"0\" alt=\"Created Events\" width=\"244\" height=\"169\" \/><\/a><\/p>\n<p><span style=\"font-size: x-small;\">(Fig 3: The generated event handler script blocks)<\/span><\/p>\n<p><span style=\"font-size: x-small;\">\u00a0<\/span><\/p>\n<p>After the event handlers are added to a control, a user can quickly edit them by using the Designer\u2019s\u00a0 \u201cGo to Event\u201d context menu option.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/GoToEvent.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"GoToEvent\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/07\/GoToEvent_thumb.png\" border=\"0\" alt=\"GoToEvent\" width=\"244\" height=\"169\" \/><\/a><\/p>\n<p><span style=\"font-size: x-small;\">(Fig 4: Use the Go To Event option to edit a specific control\u2019s event handler in the script editor.)<\/span><\/p>\n<p><span style=\"font-size: x-small;\">As demonstrated, the event handler creation process can now be handled directly in the Designer without having to access the Property Pane.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This month, we are looking at PrimalForms 2011 and how to add event handlers to form controls. After evaluating PrimalForms 2009\u00a0and user feedback, we decided to improve the process of adding event handlers in PrimalForms 2011. In PrimalForms 2009, you can create the default event by double clicking on the control or by using the [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[582,575,21],"tags":[314,552,327],"class_list":["post-2316","post","type-post","status-publish","format-standard","hentry","category-feature-peek","category-primalforms-2011-software-news","category-software-news","tag-primalforms","tag-visual-powershell","tag-winform"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=2316"}],"version-history":[{"count":4,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2316\/revisions"}],"predecessor-version":[{"id":2394,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2316\/revisions\/2394"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=2316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=2316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=2316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}