Profile Picture

Want to add custom control into dockingcommandbar

Posted By JSW W. 14 Years Ago
Author
Message
JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1
i use insert and all is well. Cheers

JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1
hello almost there
Can you give me the trick to change order of the buttons? commands.add() listed my control on the right most.
Thanks,

Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hello JSW W.,

You can subclass the NControlHostCommand class and in the constructor should create the desired control and call SetControl(control) method.

Here is an example how can create such a command that hosts a text box control:

public class NTextBoxCommand : NControlHostCommand

{

    public NTextBoxCommand()

    {

        NTextBox tb = new NTextBox();

        tb.Size = new Size(PrefferedWidth, PrefferedHeight);

        SetControl(tb);

    }

}

Then you need to create an instance of this class and add it to the toolbars Commands collection.

Regards,

Angel.



JSW W.
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1

There are two control by default available, combobox and button for dockingcommandbar.

Are there way to insert other controls? If possible how to referent to it.

Thanks,





Similar Topics


Reading This Topic