Object: ActionObjButton
- Updated2024-09-12
- 1 minute(s) read
(BarManager | Collections) > ActionObjs > Object: ActionObjButton
Object: ActionObjButton
The ActionObjButton object provides a bar element that corresponds to a button.
The element is a button if the Type property of the bar element contains the value eActObjTypeButton.
The following example adds a button to the toolbar in DIAdem ANALYSIS. The example assigns a graphic and a tooltip to the button.
| VBScript | Python |
Dim oMyActionObj If not (BarManager.ActionObjs.Exists("MyButton")) Then Set oMyActionObj = BarManager.ActionObjs.Add("MyButton", "CustomButton") oMyActionObj.Picture = "favicon.ico" oMyActionObj.Tooltip = "MyButton" oMyActionObj.OnClickCode.Code = "Call MsgBoxDisp(""MyButton"")" Else Set oMyActionObj = BarManager.ActionObjs("MyButton") End If Call BarManager.Bars("ANAMain").UsedActionObjs.Add(oMyActionObj)
Properties
BaseID | Caption | Enable | ID | Kind | OnClickCode | OnRefreshCode | Picture | Shape | Tooltip | Type | Visible
Methods
GetBarID | Reset | ResetCaption | ResetPicture | ResetTooltip
Returned From
ActionObjs.Add | ActionObjs.Copy | ActionObjs.Item | BarManager.AddMenuItem | BarManagerUnattached.AddMenuItem | UsedActionObjs.Item