Klaas Holwerda escribió: > Yesid Hernandez wrote: > >> Hi all, >> >> Well I've been using this library to do a set of plots, I haven't be >> able to figure out how can a delete a curve from the a2dPlot class. I >> want to delete a specific plot among another. >> > > So a2dCanvasXYDisplayGroupAreas ( base of a2dPlot ) has: > > a2dCurve* GetCurveFromArea(const wxString& curveAreaName, const wxString > curvename ); > > Therefore > > a2dCurve* p = myplot->GetCurveFromArea( areaname, curvename ); > p->SetRelease( true ); > p->SetPending( true ); > > Or if you know the curvearea from a2dCurvesArea* AddCurvesArea(const > wxString& curveAreaName ), > you can do: > > a2dCurve* p = myplot->GetCurve( curvename ); > p->SetRelease( true ); > p->SetPending( true ); > > Or also more general with events etc., but the above is best/oke here i think. > > mycurvearea->ReleaseChild( p ) > > > Understand that a2dCurvesArea::GetCurves() is this: > > a2dCanvasObjectList* GetCurves() { > return GetChildObjectList(); > } > > And therefore you can add any a2dCanvasObject as a child to a a2dCurvesArea ( > circles, polygons etc. ) > > > Regards, > > Klaas > > I appreciate your help, that worked ok. I was thinking maybe it would be clear to have a delCurve() method, or something like this because for me was not clear the SetPending and SetRelease methods. IMHO.
I have another questions: 1. I need to move the points for plot, viewing the curves sample I saw there is a a2dStToolContr, the constructor for this object is a2dStToolContr <cid:part1.03090705.04050208@gmail.com> (a2dCanvasView <cid:part2.00090100.02010700@gmail.com> *view, wxFrame *where), my problem is that the canvas is located in a wxDialog not a wxFrame, so when I set this property I get a error. The other questions is that the points are supossed to be move only in the x axis. 2. As I can move the points directly within the plot, I want to be move from some spinCtrls, unfortunately I didn't find the way to do this neither. Well, again thanks for any help you can give me. With this experience I'm writing some how to with this control, to share it with everyone. Regards, Ibraim ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wxart2d-users_dev mailing list Wxart2d-users_dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev