主题
Width (属性)
返回一个 float 值,它代表对象的宽度(以磅为单位)。
示例
python
#下例显示 Sheet1 中的第一个图表的第二个图例项的图例标示的宽度
def test():
legend = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Legend
print(legend.LegendEntries(2).LegendKey.Width)
python
#本示例显示 Chart1 上第一个图例项的图例标示的宽度
def test():
legend = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Legend
print(legend.LegendEntries(1).LegendKey.Width)