Home » Community » Newbie corner » Problem in example code (Tried SplitterFrame yet minor problem.)
Re: Problem in example code [message #45846 is a reply to message #45844] |
Tue, 12 January 2016 17:00   |
|
koldo wrote on Tue, 12 January 2016 18:27Hello Abhijit
For the ScatterCtrl the best for you would be to open ScatterCtrl_demo and reading for example tab1_Basic.cpp.
For example you can declare a Vector<Pointf> data in a safe place (as a class member, for example), fill it with the data from your file and do this:
void Tab1_Basic::Init()
{
CtrlLayout(*this);
SizePos();
data << Pointf(10, 26) << Pointf(20, 37) << Pointf(30, 31) << Pointf(40, 33) << Pointf(50, 28);
scatter.AddSeries(data).Legend("Series 1").Fill().MarkBorderColor();
scatter.SetRange(60, 50).SetMajorUnits(10, 10);
scatter.ShowInfo().ShowContextMenu().ShowPropertiesDlg().SetPopText("h", "v", "v2").SetMouseHandling(true, true);
scatter.SetLegendPos(Point(20, 20));
}
Dear Koldo,
Thanks a lot for the reply. I have already seen the scattercontrol example. However, my problem is that if filename="......" known then how can I load data and place in Pointf vector? I did not see cin type of function. At the same time, if I use LoadFromFile(filename) then string will be loaded.
Actually I am confused and can't formulate exact code.
Best regards,
Abhijit
|
|
|
Goto Forum:
Current Time: Sun May 04 22:49:15 CEST 2025
Total time taken to generate the page: 0.03094 seconds
|