Page 1 of 1
Change MarksTip font
Posted: Wed Nov 10, 2010 3:38 pm
by 15654836
Hello,
I'd like to change the font of the "MarksTip" tool, but found no way doing so. Is it possible?
Thanks,
Markus
Re: Change MarksTip font
Posted: Wed Nov 10, 2010 4:50 pm
by 10050769
Hello Markus,
I afraid that it is not possible. Could you please, tell us exactly what are you doing, so we can try to find a alternative solution?
Thanks,
Re: Change MarksTip font
Posted: Thu Nov 11, 2010 7:20 am
by 15654836
Hello Sandra,
thanks for the quick response.
I'd like to display a custom text as the tool tip in a table format. In order to achieve this table format I want to use a monospaced font like Courier. That's why I was looking for a way to change the font.
Regards,
Markus
Re: Change MarksTip font
Posted: Thu Nov 11, 2010 11:57 am
by 10050769
Hello Markus,
I have investigated, and I have decided to add your request in feature request list [
TF02015274] to be considered for inclusion in future versions of TeeChart.Net. On the other hand, I found an alternative of MarkTips, that I think you can use annotation tool and MouseMove event as do in next example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Tools.Annotation anno1;
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
anno1 = new Steema.TeeChart.Tools.Annotation(tChart1.Chart);
anno1.Active = false;
bar1.FillSampleValues();
tChart1.MouseMove = new MouseEventHandler(tChart1_MouseMove);
}
void tChart1_MouseMove(object sender, MouseEventArgs e)
{
anno1.Active = false;
int series1 = (tChart1[0] as Steema.TeeChart.Styles.Bar).Clicked(e.X, e.Y);
if (series1 != -1)
{ anno1.Active = true;
anno1.Shape.CustomPosition = true;
anno1.Left = e.X;
anno1.Top = e.Y;
anno1.Text = tChart1[0].YValues[series1].ToString();
anno1.Shape.Font.Name = "Arial";
anno1.Shape.Font.Size = 12;
}
}
Could you tell us if previous code works as you want?
I hope will helps.
Thanks,
Re: Change MarksTip font
Posted: Thu Nov 11, 2010 1:08 pm
by 15654836
Hallo,
thanks for adding it to the request list and also thanks for the example with the annotation.
I've performed a quick test and it seems to work for me!
Thanks,
Markus