Examples: AddCommandBar()


The following example is the IG_CreateToolbars procedure in the sample integrating application. It uses the AddCommandBar() function to add the sample integration’s toolbar for all users. It attempts to place the toolbar at the beginning of the second row.

local integer status;
local integer pos;

{Add command bar only if it doesn't exist for the user}
if ExistsForUserID("",
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample)) of form syCmdBarObj = true then
	abort script;
end if;

{Add the toolbar and clone for each user who has toolbars}
pos = 0; {Place at the beginning of the row}
status = AddCommandBar("",
	IG_PROD_ID,
	resourceid(form Command_IG_Sample),
	resourceid(command CL_IG_Sample_CMDBAR of form Command_IG_Sample),
	true, {visibility}
	2, {row number}
	pos, {position}
	true) of form syCmdBarObj;


Documentation Feedback