![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | TMarksTipTool.OnGetText event - Sender.Series not set | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | ChristianH <christian.holzner> |
| Component: | Chart | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | normal | CC: | sandra |
| Priority: | --- | ||
| Version: | 140923 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | Demo | ||
Hello ChristianH, We can't reproduce the problem here; the MarkTipsTool is different to Nil for us. Could you please attach a complete example where we can reproduce the problem you are experiencing? Thanks in advance, Regards. Created attachment 366 [details]
Demo
Find attached sample which demonstrates that problem.
Hello, Many thanks for the project you attached here. The problem you are experiencing is produced because there isn't any series assigned to MarksTipTool . If you don't want get a null value, is necessary assign a series to the tool. Thanks in advance, I am wondering about the design of that series property. 1. If no series is attached, then in the designer it is displayed as "All". 2. If that "All" is selected, then the event is fired for every series. So I would expect, that within that event I will get the information which series caused that event to be fired!! So, IMO this is a bug. Hello,
The Sender.Series of MarkTipsTool GetText event isn't an event parameter is a tool property and it must be assigned a specific series if you want the tool Sender.Series isn't nil. Also, you should consider that you are using tool event instead of the Series event. Therefore it isn't a bug is tool design. Analysing the example you sent us, I think you can use the GetMarksText Series event. You only need add the lines code below in GetMarksText:
...
procedure TForm6.Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer;
var MarkText: string);
begin
if Sender = nil then
Listbox.Items.Add('Sender.Series = nil')
else
Listbox.Items.Add(Sender.Name);
end;
...
Thanks in advance
|
In the TMarksTipTool.OnGetText event the Sender.Series property is not set (i.e. it's nil). E.g. to confirm... procedure TForm.ChartTool1GetText(Sender: TMarksTipTool; var Text: string); begin if Sender.Series = nil then Self.Caption := 'Sender.Series = nil' else Self.Caption := Sender.Series.Name; end;