Copying a TeeChart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Copying a TeeChart

Post by vijay » Thu Sep 21, 2006 3:01 pm

Hello TeeChart crew,
I am a new member here.I have some questions.

1)I have a winform with 2 tabcontrols each tabcontrol containing 2 tabpages.How to copy a particular tabpage with teecharts on it and paste in MSWord?

2)Can we copy a particular teechart without exporting it?

3)Can we right click on a teechart on tabpage and have some menucontrols like copy,print etc?

Thanx in advance.

Regards

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Sep 21, 2006 3:26 pm

Hi vijay,

Please find below the answers to your questions:

1. To copy a TChart to the clipboard you need to use something like this:

Code: Select all

    private void button1_Click(object sender, EventArgs e)
    {
      tChart1.Export.Image.JPEG.CopyToClipboard();
    }
If you need to copy the full TabPage you will have to loo for how this control is copied to the clipboard, for example:

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxmancli/html/25152454-0e78-40a9-8a9e-a2a5a274e517.htm


2. No, you'll need to copy the chart to a native template file (.ten), a MemoryStream or an image as shown above.


3. You can do this:

Code: Select all

    private void tChart1_MouseClick(object sender, MouseEventArgs e)
    {
      if (e.Button == MouseButtons.Right)
      {
        tChart1.ShowEditor();
      }
    }
Or use a ContextMenu where the desired commands are implemented for each menu option.
Best Regards,
Narcís Calvet / 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

vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Post by vijay » Thu Sep 21, 2006 3:47 pm

Thanx a lot for your quick response

vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Post by vijay » Thu Sep 21, 2006 3:59 pm

When I export it as bmp/jpeg/png ..its fine,but when Im trying to copy that Image into a word document..its copying only bottom axis...
Same problem even when I used copytoclipboard.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Sep 21, 2006 4:02 pm

Hi vijay,

It works fine for me here using latest Debug Build version available at the client area. Which TeeChart version are you using?

If the problem persists could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Best Regards,
Narcís Calvet / 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

vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Post by vijay » Thu Sep 21, 2006 4:11 pm

Im using
"TeeChart.NET version 2
Build 2.0.2306.26233"
Its a huge project..Im afraid I cant post these files :(

vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Post by vijay » Thu Sep 21, 2006 4:47 pm

Sorry..It was some setting problems in MSWord..Now its fine..
Thanx for ur help.

vijay
Newbie
Newbie
Posts: 36
Joined: Mon Sep 26, 2005 4:00 am

Post by vijay » Fri Sep 22, 2006 9:25 am

As I have many TeeCharts on one tabpage,can I render them into a DIB(Device Independent Bitmap) so that I can copy/print all of them at a time?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Sep 22, 2006 10:32 am

Hi vijay,

You could try using TeeChart's Bitmap exporting feature. You could also use tChart1.Draw method and draw in the canvas you want. The forums threads below may be helpful as well:

http://www.teechart.net/support/viewtopic.php?t=1883
http://www.teechart.net/support/viewtopic.php?t=2053
http://www.teechart.net/support/viewtopic.php?t=3022
Best Regards,
Narcís Calvet / 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

Post Reply