Add a Gauge at run time. Problems

TeeChart for ActiveX, COM and ASP
Post Reply
hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Add a Gauge at run time. Problems

Post by hansw » Thu Nov 27, 2003 5:28 am

After creating a gauge at run time it is visble, but I cannot access it to do anything with it.

m_ChartGauge.Series(0).GetAsGauge().SetValue(50.0); // does not work

Here is the create() function of a formview where I also create the gauge.

BOOL C_ControlPanel::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
if ( ! CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext) )
{
return false;
}

if (!m_ChartGauge.Create(lpszClassName,
"",
dwStyle,
CRect(0,300,120,400),
this,
IDC_TCHART_GAUGE,
pContext ))
{
return FALSE;
}

m_ChartGauge.SetVisible(true); // OK the gauge iis visible

m_ChartGauge.AddSeries(scGauge); // is this needed ?

m_ChartGauge.Series(0).GetAsGauge().SetValue(50.0); // does not work

return TRUE;

}

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun Nov 30, 2003 8:18 pm

>m_ChartGauge.AddSeries(scGauge); // is this needed ?
Where are you creating the scGauge series ?

Could you please send me one example with which I can reproduce the problem "as is" here.
You can send it to the steema.public.attachments newsgroup or to pep@steema.com

Josep Lluis Jorge
http://support.steema.com

Post Reply