Change MarksTip font

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Change MarksTip font

Post by SurveyBob » Wed Nov 10, 2010 3:38 pm

Hello,

I'd like to change the font of the "MarksTip" tool, but found no way doing so. Is it possible?

Thanks,
Markus

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Change MarksTip font

Post by Sandra » Wed Nov 10, 2010 4:50 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Re: Change MarksTip font

Post by SurveyBob » Thu Nov 11, 2010 7:20 am

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Change MarksTip font

Post by Sandra » Thu Nov 11, 2010 11:57 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Re: Change MarksTip font

Post by SurveyBob » Thu Nov 11, 2010 1:08 pm

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

Post Reply