Page 1 of 1

Using PageNumTool

Posted: Mon Oct 26, 2009 4:20 pm
by 15051059
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

Re: Using PageNumTool

Posted: Tue Oct 27, 2009 11:59 am
by yeray
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.