Using PageNumTool

TeeChart for ActiveX, COM and ASP
Post Reply
Raymond
Newbie
Newbie
Posts: 27
Joined: Tue Dec 02, 2008 12:00 am

Using PageNumTool

Post by Raymond » Mon Oct 26, 2009 4:20 pm

Hi,

I am trying to set the margins and the size of the PageNumTool. I can do it in the designer, however, there does not seem to be a way to do it programmatically.

The code I tried:
tChart.GetTools().GetItems(0).GetAsPageNum().SetAutoSize(false);
tChart.GetTools().GetItems(0).GetAsPageNum().SetHeight(16);
tChart.GetTools().GetItems(0).GetAsPageNum().SetWidth(111);
tChart.GetTools().GetItems(0).GetAsPageNum().SetBounds(48,5,40,5);
tChart.GetTools().GetItems(0).GetAsPageNum().SetPosition(ppRightTop);

What I end up getting from the above code is a PageNumTool with a width of 1 and and height of 0.

Raymond

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Using PageNumTool

Post by Yeray » Tue Oct 27, 2009 11:59 am

Hi

I'm able to change the size and position but I think that the margins aren't accessible at runtime:

Code: Select all

  With TChart1.Tools.Items(0).asPageNum
    .AutoSize = False
    .PositionUnits = puPixels
    .Left = 500
    .Top = 25
    .Width = 200
    .Height = 30
    .TextAlignment = aCenter
  End With
I'll add this to the wish list to be implemented in future releases.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply