本文整理匯總了Python中widgets.Widget.y方法的典型用法代碼示例。如果您正苦於以下問題:Python Widget.y方法的具體用法?Python Widget.y怎麽用?Python Widget.y使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類widgets.Widget
的用法示例。
在下文中一共展示了Widget.y方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: layout
# 需要導入模塊: from widgets import Widget [as 別名]
# 或者: from widgets.Widget import y [as 別名]
def layout(self, x, y):
"""
Lays out all Widgets within this layout.
@param x X coordinate of lower left corner
@param y Y coordinate of lower left corner
"""
Widget.layout(self, x, y)
row_index = 0
placement = Widget()
placement.y = y + self.height
for row in self.content:
col_index = 0
placement.x = x
placement.height = self.max_heights[row_index]
placement.y -= placement.height
for cell in row:
placement.width = self.max_widths[col_index]
if cell is not None:
if cell.is_expandable():
cell.expand(placement.width, placement.height)
cell.layout(*GetRelativePoint(placement, self.anchor,
cell, self.anchor,
self.offset))
placement.x += placement.width
col_index += 1
row_index += 1