gljakal's ToDo - Plugin developer's reference

PluginBase.getAdditionalControls Method 

[This is preliminary documentation and subject to change.]

Returns the additional controls to be placed on the main form

public virtual Control[] getAdditionalControls();

Return Value

An array of System.Windows.Forms.Control objects

Remarks

The additional controls returned should be initialized only once (IE as a private variable in the plugin)
It is also important to specify the Dock property for each returned control in order to position it correctly inside the main form.

Example

The following example adds a TextBox control on the bottom of the main form:

public class TestPlugin : ToDo.Plugin.PluginBase
{
    private TextBox pTextbox;
    
    public TestPlugin(ToDo.Plugin.IComunicator c) : base(c)
    {
        pTextbox = new TextBox();
        pTextbox.Size = new System.Drawing.Size(100, 20);
        pTextbox.Dock = DockStyle.Bottom;
        pTextbox.TextChanged += new EventHandler(pText_Changed);
    }
        
    public override Control []getAdditionalControls()
    {
        return new Control []{ pTextbox };
    }
}

See Also

PluginBase Class | ToDo.Plugin Namespace | getAdditionalDetailControls