【问题标题】:Merge adiacent cells in a wx.Grid合并 wx.Grid 中的相邻单元格
【发布时间】:2012-02-28 15:32:54
【问题描述】:

是否可以合并 wx.grid 中的相邻单元格?我的意思是水平的作为一行中的单元格和垂直的作为一列中的单元格。

【问题讨论】:

    标签: grid wxpython


    【解决方案1】:

    有一种方法可以使文本跨越网格小部件中的多行或多列。 wxPython 演示中有一个名为 GridSimple.py 的示例。见第 64-67 行。它们的内容如下:

    self.SetCellValue( 9, 1, "This default cell will overflow into neighboring cells, but not if you turn overflow off.");
    self.SetCellSize(11, 1, 3, 3);
    self.SetCellAlignment(11, 1, wx.ALIGN_CENTRE, wx.ALIGN_CENTRE);
    self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns");
    

    注意:您不需要分号。我不知道他们为什么会出现在示例中。

    【讨论】:

      猜你喜欢
      • 2017-07-24
      • 1970-01-01
      • 1970-01-01
      • 2021-07-26
      • 1970-01-01
      • 1970-01-01
      • 2019-10-28
      • 2016-07-24
      • 1970-01-01
      相关资源
      最近更新 更多