Type | Description | |||
Key as Variant | A string expression that indicates the button's key. The Key parameter is passed to the ButtonClick event when user clicks the button. | |||
Image as Variant | A long expression that indicates the index of icon being displayed into the button, or a Picture object that contains the buttons' image. 0 means no icon. | |||
Align as Variant | An AlignmentEnum expression that indicates the button's alignment in the editor's client area. | |||
ToolTip as Variant | A string expression that indicates the button's tool tip. The tooltip shows up when the user moves the cursor over the button. | |||
ToolTipTitle as Variant | A string expression that indicates the button's tool tip title. |
The AddButton method adds new buttons to the control. Use the ClearButtons to clear the buttons collection. Use the RemoveButton method to remove a button given its key. The ButtonClick event notifies your application that the user clicks a button in the editor. Use the ButtonWidth property to specify the width of the button , in pixels.
The following sample adds two left aligned buttons, and three right aligned buttons:
Editor1.AddButton "Add", 1, LeftAlignment, "Click here to add new items", "Add" Editor1.AddButton "Load", 2, LeftAlignment, "Click here to load a file", "Load" Editor1.AddButton "Save", 3, RightAlignment, "Click here to save the file.", "Save" Editor1.AddButton "Remove", 4, RightAlignment, "Click here to remove the current item", "Remove" Editor1.AddButton "Clear", 5, RightAlignment, "Click here to clear the items", "Clear"
The following sample adds a new button using a picture file:
Editor1.AddButton "Save", LoadPicture("save.gif"), RightAlignment, "Click here to save the file.", "Save"