|
|
|||
Home Products Downloads Registered users Support Prices Order Primary Subscription |
|
||
TaxpAddIn methodsAddCmdBarAdds or finds the command bar.
protected
function AddCmdBar(const Name: string;
var NewControl: boolean;
Position: MsoBarPosition = msoBarFloating): IaxpCmdBar; Adds or finds the command bar with the name (CommandBar.Name) specified by the Name parameter in the CommandBars collection of the host application. This method looks in the CommandBars collection for the command bar specified and creates it if there is no such a command bar. Returns a reference to the IaxpCmdBar interface. Parameters:
Sample code:
var
ICmdBar: IaxpCmdBar;
begin
isNew: boolean;
ICmdBar := AddCmdBar('My Bar', isNew);
end;
if isNew then
ICmdBar.Width ;= 200;
AddControlAdds a control (CommandBarControl) to the specified command bar.
protected
function AddControl(const CmdBarName, Caption,
Tag, Hint: string; Type_: TaxpControlType;
var NewControl: boolean; Before: integer = -1; Popup: IaxpPopup = nil): IaxpControl; This method looks for a control with the specified Tag in the command bar called CmdBarName. If the control isn't found, the method creates the control and adds it to the command bar, initializing Caption, Tag, and Hint properties of the control according to the passed parameters. Returns a reference to the IaxpControl interface. Parameters:
Sample code:
var
ICtrl: IaxpControl;
begin
isNew: boolean;
ICtrl := AddControl('My Bar', 'My control', 'MyControlTag',
end;
'This is My Button', axpButton, isNew);
if isNew then
ICtrl.HelpFile := 'MyHelp.chm';
AddButtonAdds a button (CommandBarButton) to the specified command bar.
protected
function AddButton(const CmdBarName, Caption, Tag,
Hint, ImageIndex: string;
const Style: MsoButtonStyle; var NewControl: boolean; Before: integer = -1; Popup: IaxpPopup = nil; TransparentColor: TColor = clDefault): IaxpButton; This method looks for a button with the specified Tag in the command bar called CmdBarName. If the button isn't found, the method creates the button and adds it to the command bar, initializing Caption, Tag, and Hint properties of the button according to the passed parameters. Returns a reference to the IaxpButton interface. Parameters:
Sample code:
var
IBtn: IaxpButton;
begin
isNew: boolean;
IBtn := AddButton('My Bar', 'My button', 'MyButtonTag',
end;
'This is My Button', '', msoButtonIconAndCaption, isNew);
if isNew then
IBtn.Width := 60;
AddEditAdds an edit box to the specified command bar.
protected
function AddEdit(const CmdBarName, Caption,
Tag, Hint: string; Style: MsoComboStyle;
var NewControl: boolean; Before: integer = -1; Popup: IaxpPopup = nil): IaxpEdit; This method looks for an edit box with the specified Tag in the command bar called CmdBarName. If the edit box isn't found, the method creates the edit box and adds it to the command bar, initializing Caption, Tag, and Hint properties of the edit box according to the passed parameters. Returns a reference to the IaxpEdit interface. Parameters:
Sample code:
var
IEdit: IaxpEdit;
begin
isNew: boolean;
IEdit := AddEdit('My Bar', 'My edit', 'MyEditBoxTag',
end;
'This is My Edit', msoComboLabel, isNew);
if isNew then
IEdit.Text := 'New value';
AddComboBoxAdds a combo box to the specified command bar.
protected
function AddComboBox(const CmdBarName, Caption,
Tag, Hint: string; Style: MsoComboStyle;
DropDown: boolean; var NewControl: boolean; Before: integer = -1; Popup: IaxpPopup = nil): IaxpComboBox; This method looks for a combo box with the specified Tag in the command bar called CmdBarName. If the combo box isn't found, the method creates the combo box and adds it to the command bar, initializing Caption, Tag, and Hint properties of the combo box according to the passed parameters. Returns a reference to the IaxpComboBox interface. Parameters:
Sample code:
var
ICBox: IaxpComboBox;
begin
isNew: boolean;
ICBox := AddComboBox('My Bar', 'My combobox',
end;
'MyComboBoxTag', 'This is My ComboBox',
if isNew then begin
msoComboNormal, True, isNew);
ICBox.Clear;
end;
ICBox.AddItem('Item1', EmptyParam); ICBox.AddItem('Item2', EmptyParam); ICBox.AddItem('Item3', EmptyParam); ICBox.AddItem('Item4', EmptyParam); AddPopupAdds a popup control (CommandBarPopup) to the specified command bar.
protected
function AddPopup(const CmdBarName, Caption,
Tag, Hint: string; var NewControl: boolean;
Before: integer = -1; Popup: IaxpPopup = nil): IaxpPopup; This method looks for a pop-up control with the specified Tag in the command bar called CmdBarName. If the pop-up control isn't found, the method creates the pop-up control and adds it to the command bar, initializing Caption, Tag, and Hint properties of the pop-up control according to the passed parameters. Returns a reference to the IaxpPopup interface. Parameters:
Sample code:
var
IPopup: IaxpCmdBarPopup;
begin
isNew: boolean;
IPopup := AddPopup('My Bar', 'My Popup', 'MyPopupTag',
end;
'This is My Popup', IsNew);
if isNew then
IPopup.Width := 200;
|
Developed forDelphi 5, 6, 7
[ Download it ] Immediate shipment
|