User (Legacy) Posted March 15, 2000 Report Share Posted March 15, 2000 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.