GridBandTool SetTransparency Fails with Member Not Found
Posted: Fri Apr 23, 2010 2:03 pm
When i attempt to set the transparency of a GridBandTool band i get a Member Not Found exception. I am using v8 of the ocx component in C++. The code looks as follows. Also all the GridBandBrush members work except the last 3 (SetTransparency, GetTransparency, and GetGradient)
CToolList toolList = m_teChart.GetTools();
int item = toolList.Add(tcGridBand);
tools = toolList.GetItems(item);
CGridBandTool gridBand = tools.GetAsGridBand();
COleVariant v(short((m_showBands != 2) ? atLeft : atBottom));
gridBand.SetAxis(v);
CGridBandBrush band = gridBand.GetBand1();
band.SetColor(m_rgbBand1);
// band.SetTransparency(50); // this causes a "Member not found" error
band = gridBand.GetBand2();
band.SetColor(m_rgbBand2);
// band.SetTransparency(50);
CToolList toolList = m_teChart.GetTools();
int item = toolList.Add(tcGridBand);
tools = toolList.GetItems(item);
CGridBandTool gridBand = tools.GetAsGridBand();
COleVariant v(short((m_showBands != 2) ? atLeft : atBottom));
gridBand.SetAxis(v);
CGridBandBrush band = gridBand.GetBand1();
band.SetColor(m_rgbBand1);
// band.SetTransparency(50); // this causes a "Member not found" error
band = gridBand.GetBand2();
band.SetColor(m_rgbBand2);
// band.SetTransparency(50);