// Add new button in existing form AX
private void San_addAboutButton()
{
FormActionPaneControl actionPane;
FormActionPaneTabControl actionPaneTab;
FormCommandButtonControl cmdAbout;
FormButtonGroupControl btngrp;
#define.taskAbout(259)
actionPane = this.design().controlNum(1);
if (!actionPane ||
!(actionPane is FormActionPaneControl) ||
actionPane.style() == ActionPaneStyle::Strip)
{
return;
}
actionPaneTab = actionPane.controlNum(1);
if (!actionPaneTab ||
!(actionPaneTab is FormActionPaneTabControl))
{
return;
}
btngrp = actionPaneTab.addControl(
FormControlType::ButtonGroup, 'ButtonGroup');
btngrp.caption("About");
cmdAbout = btngrp.addControl(
FormControlType::CommandButton, 'About');
cmdAbout.command(#taskAbout);
cmdAbout.imageLocation(SysImageLocation::EmbeddedResource);
cmdAbout.normalImage('412');
cmdAbout.big(NoYes::Yes);
cmdAbout.saveRecord(NoYes::No);
}
RUn Method
this.San_addAboutButton()
private void San_addAboutButton()
{
FormActionPaneControl actionPane;
FormActionPaneTabControl actionPaneTab;
FormCommandButtonControl cmdAbout;
FormButtonGroupControl btngrp;
#define.taskAbout(259)
actionPane = this.design().controlNum(1);
if (!actionPane ||
!(actionPane is FormActionPaneControl) ||
actionPane.style() == ActionPaneStyle::Strip)
{
return;
}
actionPaneTab = actionPane.controlNum(1);
if (!actionPaneTab ||
!(actionPaneTab is FormActionPaneTabControl))
{
return;
}
btngrp = actionPaneTab.addControl(
FormControlType::ButtonGroup, 'ButtonGroup');
btngrp.caption("About");
cmdAbout = btngrp.addControl(
FormControlType::CommandButton, 'About');
cmdAbout.command(#taskAbout);
cmdAbout.imageLocation(SysImageLocation::EmbeddedResource);
cmdAbout.normalImage('412');
cmdAbout.big(NoYes::Yes);
cmdAbout.saveRecord(NoYes::No);
}
RUn Method
this.San_addAboutButton()
No comments:
Post a Comment