SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Code completion: one Control needs several EventHandlers

Last post 09-28-2007 2:13 PM by Juergen Thomas. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-28-2007 2:13 PM

    Code completion: one Control needs several EventHandlers

    In this situation, I have to do the following steps:

    • switch to designer mode
    • mark the control
    • switch to property grid
    • switch to events page
    • double click on the first EventHandler
    • switch to designer mode again
    • mark the control if necessary
    • switch to property grid
    • switch to events page
    • double click on next EventHandler
    • and so on for all the others events

    I'ld prefer a simplier way: Choose one control in a ComboBox, choose all the EventHandlers in a CheckedListBox, create the method templates, add the EventHandlers to the control in the .Designer.cs

    Perhaps, this way could be integrated in the ShowCompletionWindow() method using Ctrl-Ins. But the integration of CheckedListBox and ComboBox could be a little bit more complicated. Therefore, a better way could be the ContextMenu after writing the code for the first EventHandler as a MenuItem "Add more EventHandlers to this control". Another way could be the following using the property grid:

    • switch to designer mode
    • mark the control
    • switch to property grid
    • switch to events page
    • set a CheckBox to "stay open"
    • double click on the first EventHandler; because of the new CheckBox, the property grid stays at the events page
    • double click the next EventHandler
    • and so on for all the others events
    • then switch to editor mode (the CheckBox witches to "not stay open", automatically)

    Juergen

    until now Version 2.2.1.2648

    Software fuer Verlage (Publishers)
    #D + NET 2.0 + Firebird 2.0
    (formerly Delphi 5 + 2005 Pro)
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.