Using PageNumTool
Posted: 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
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