On Sun, May 30, 2010 at 15:57, Rick <r...@sloservers.com> wrote: > Alexander Klenin wrote: >> My current thinking is that it should be a simple comma-separated list >> of series indexes, but that seems somewhat un-Pascalish, >> so maybe you have a better idea? > > I'm too new to Pascal and Lazarus to be of much help here. If there's a way > to > pop up a list of TConstantLine types and store the selected indexes into an > array, > that would work. Maybe we can find another custom control that does something > similar and already solved this problem.
> The other ugly-hack idea I had was to add a new property to TConstantLine. > IsDragable or ControlledByDragTool. I'd much rather have the property in > the tool, though. This is the way UseReticule property works now, and I agree that it is not the optimal design. >> BTW, please do not write much code depending on current >> TConstantLineDragTool >> interface just yet -- I think I might change it substantially to a >> more general one. >> > > Oops, I was just in the middle of adding some events to it. I was going to > send you a patch > but perhaps I'll just make a request if you're going to go in there soon > anyway. Thanks for your efforts. It is indeed easier for me at this stage to do it myself, since it is a small, but tricky change. > I think the tool should have OnStart, OnChangePosition, and OnEnd events (or > something similarly named). > OnStart and OnEnd to be called from the MouseDown and MouseUp events, and > OnChangePosition to be > called from the MouseMove event. I have added a group of mouse events to all chart tool descendants in r25799. See toolsdemo for an example usage. -- Alexander S. Klenin -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus