Jump to content
Software FX Community

Adding Custom Commands

User (Legacy)

Recommended Posts


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->ToolBarObj->AddItems(1,10); // add 1 item in the 10th


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;


// pToolItem.CommandID = CFX_ID_PRINT;

Any help would be appreciated.

Thank you


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...