User (Legacy) Posted June 12, 2000 Report Share Posted June 12, 2000 (VC6, DLL Build 16) I'm noticing what I think is a bug with the annotation group objects. Specifically, I can't get them to behave as if AllowModify = FALSE. Here's the scenario: I programmatically create three text objects and put them on the graph with AllowModify and AllowMove both set to false. When I run the program, everything works fine: I can select the text boxes, but I can't move them, and all the modification toolbar selections grey out when they are selected. So next I came up with the bright idea of grouping them all together. However, when I select the group object at run-time, I can still modify it using the toolbar (though I can't move it.) Unfortunately, this allows my users to make all sorts of silly grapohs that I don't want them to. Is this a bug or am I doing something wrong? (Code is below.) Andrew // Create the title group. IAnnGroupPtr pTitleGroup = pAnnList->Add((long)OBJECT_TYPE_GROUP); // Chart title IAnnTextPtr pText = pTitleGroup->Add((long)OBJECT_TYPE_TEXT); pText->AllowMove = VARIANT_FALSE; pText->AllowModify = VARIANT_FALSE; pText->Attach(ATTACH_NONE, NULL); pText->Top = 10; pText->Left = 80; pText->Height = 20; pText->Width = 510; pText->Align = LA_LEFT | LA_BASELINE; pText->BkColor = CHART_TRANSPARENT; pText->Text = "Main Title"; // First column of chart info. pText = pTitleGroup->Add((long)OBJECT_TYPE_TEXT); pText->AllowMove = VARIANT_FALSE; pText->AllowModify = VARIANT_FALSE; pText->Attach(ATTACH_NONE, NULL); pText->Top = 30; pText->Left = 80; pText->Height = 50; pText->Width = 250; pText->BkColor = CHART_TRANSPARENT; pText->Text = "Subtitle one"; // Second column of chart info. pText = pTitleGroup->Add((long)OBJECT_TYPE_TEXT); pText->AllowMove = VARIANT_FALSE; pText->AllowModify = VARIANT_FALSE; pText->Attach(ATTACH_NONE, NULL); pText->Top = 30; pText->Left = 330; pText->Height = 50; pText->Width = 180; pText->BkColor = CHART_TRANSPARENT; pText->Text = "Subtitle two"; // Finish off the group object. pTitleGroup->Attach(ATTACH_NONE, NULL); pTitleGroup->RecalcBounds(); pTitleGroup->Refresh( VARIANT_FALSE ); pTitleGroup->AllowMove = VARIANT_FALSE; pTitleGroup->AllowModify = VARIANT_FALSE; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.