Skip to content
本页内容

Width (属性)

返回一个 float 值,它代表对象的宽度(以磅为单位)。

示例

python
#下例显示 Sheet1 中的第一个图表的第二个图例项的宽度
def test():
    legend = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.Legend
    print(legend.LegendEntries(2).Width)
python
#下例显示 Chart1 上第三个图例项的宽度
def test():
    legend = Application.Charts.Item("Chart1").ChartObjects(1).Chart.Legend
    print(legend.LegendEntries(3).Width)