ICreate.Controls.Bars Send comments on this topic.
Configure Method
See Also  Example
ICreate.Controls.Bars Namespace > ButtonBar Class : Configure Method






Display the ButtonBar configuration dialog box.

Syntax

Visual Basic (Declaration) 
Public Sub Configure() 
Visual Basic (Usage)Copy Code
Dim instance As ButtonBar
 
instance.Configure()
C# 
public void Configure()
Delphi 
public procedure Configure(); 
JScript 
public function Configure();
Managed Extensions for C++ 
public: void Configure(); 
C++/CLI 
public:
void Configure(); 

Example

This example shows how to call the  Configure method. A ContextMenuStrip with a Configure item is created and assigned to the ButtonBar. The Click event handler for the Configure menu item calls the Configure method.
C#Copy Code
using System; 
using System.Windows.Forms; 
 
namespace ExamplesButtonBarCSharp 

    public partial class ConfigureExample : Form 
    { 
        public ConfigureExample() 
        { 
            InitializeComponent(); 
 
            ContextMenuStrip menu = new ContextMenuStrip(); 
            menu.Items.Add("Configure ...", null, new EventHandler(OnConfigure)); 
            buttonBar.ContextMenuStrip = menu; 
        } 
 
        private void OnConfigure(object sender, EventArgs args) 
        { 
            buttonBar.Configure(); 
        } 
    } 
}
Visual BasicCopy Code
Imports ICreate.Controls.Bars

Public Class ConfigureExample

    Public Sub New()

        InitializeComponent()

        Dim menu As ContextMenuStrip = New ContextMenuStrip
        menu.Items.Add("Configure ...", Nothing, AddressOf OnConfigure)
        ButtonBar.ContextMenuStrip = menu

    End Sub

    Private Sub OnConfigure(ByVal sender As Object, ByVal args As EventArgs)
        ButtonBar.Configure()
    End Sub

End Class

Remarks

The Configure method is used to display the ButtonBar configuration dialog. This dialog is used to add and remove ButtonBarButtons and ButtonBarSeparators, reorder and regroup the ButtonBarButtons and ButtonBarSeparators, specify the text to display on the ButtonBarButtons and whether to use small or large images.

The Configure dialog box can also be displayed by selecting the Configure option on the overflow menu.

In general if you wish the user to be able to configure the ButtonBar, add a ContextMenuStrip to the ButtonBar, add a Configure item to the ContextMenuStrip and execute the Configure method when the Configure menu item is selected.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also