Resizing chart by dragging

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

Resizing chart by dragging

Post by nbp » Wed Jun 20, 2007 6:15 pm

I have a TChart on a PropertyPage. I want to add the capability to resize the chart by clicking on the corners (or border) of the chart panel and then dragging the corner (or border) to resize the panel. Is there an example that I can use?
Thanks.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jun 22, 2007 4:35 pm

Hi,

what about using the Selector Tool, setting the AllowResize to true ?

tchart1.Tools.Items(0).asSelector.AllowResizeChart = True

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Thu Nov 22, 2007 2:32 pm

Hi,

I have tried to "translate" suggested solution for VBScript. Unfortunately, it does not work.

Is it possible to modify this code into VBScript for using with IE7?

Thanks in advance,
Danila.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 26, 2007 11:59 am

Hi Danila,

to change the size of the ActiveX object with vbScript you will have to use the standard ms techniques, like :

Code: Select all


Sub Window_Onload()
    Set obj = document.all("TChart1")

    obj.style.pixelWidth = screen.width
    obj.style.pixelHeight = screen.height 

    FillChart()
End Sub

Post Reply