Jump to content
Software FX Community

Adding Custom Commands


User (Legacy)
 Share

Recommended Posts

Hello, 

I am trying to add a custom command to the toolbar in C++Builder4.

I had no problem with the following 2 commands:

ChartForm->ChartFX1->Commands->AddCommand(5);

ChartForm->ChartFX1->ToolBarObj->AddItems(1,10); // add 1 item in the 10th

positon

I am having problems calling the other functions/properties to set the

Style, Text, Picture and the CommandID

None of the following work:

// ChartForm->ChartFX1->Commands(5)->Text = "Exit";

// ChartForm->ChartFX1->ToolBarObj(10)->CommandID = 5;

// ChartForm->ChartFX1->ToolBarObj[10]->CommandID = 5;

I also get syntax errors if I try the following as described in the

C++Builder3 samples:

IToolbarItemDisp pToolItem;

ChartForm->ChartFX1->ToolBarObj->get_Item(1,&pToolItem);

// pToolItem.CommandID = CFX_ID_PRINT;

Any help would be appreciated.

Thank you

Nadim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...