本文整理汇总了Python中efl.elementary.table.Table.size_hint_align方法的典型用法代码示例。如果您正苦于以下问题:Python Table.size_hint_align方法的具体用法?Python Table.size_hint_align怎么用?Python Table.size_hint_align使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.table.Table
的用法示例。
在下文中一共展示了Table.size_hint_align方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import size_hint_align [as 别名]
def __init__(self, parent, title, rfunc, wfunc):
Frame.__init__(self, parent)
self.size_hint_weight = EXPAND_HORIZ
self.size_hint_align = FILL_HORIZ
self.text = title
t = Table(self, homogeneous=True, padding=(3,3))
t.size_hint_weight = EXPAND_HORIZ
t.size_hint_align = FILL_HORIZ
t.show()
l = Label(self, text="Proxy type")
l.size_hint_align = 0.0, 0.5
l.show()
ptype = Hoversel(parent)
ptype.size_hint_align = -1.0, 0.5
ptype.text = rfunc().type.name
for n in self.proxy_types.iterkeys():
ptype.item_add(n, callback=lambda x, y, z=n: ptype.text_set(z))
ptype.show()
t.pack(l, 0, 0, 1, 1)
t.pack(ptype, 1, 0, 1, 1)
l = Label(self, text="Hostname")
l.size_hint_align = 0.0, 0.5
l.show()
phost = Entry(parent)
phost.size_hint_weight = EXPAND_HORIZ
phost.size_hint_align = FILL_HORIZ
phost.single_line = True
phost.scrollable = True
phost.entry = rfunc().hostname
phost.show()
t.pack(l, 0, 1, 1, 1)
t.pack(phost, 1, 1, 1, 1)
l = Label(self, text="Port")
l.size_hint_align = 0.0, 0.5
l.show()
pport = Spinner(parent)
pport.size_hint_align = -1.0, 0.5
pport.min_max = 0, 65535
pport.value = rfunc().port
pport.show()
t.pack(l, 0, 2, 1, 1)
t.pack(pport, 1, 2, 1, 1)
l = Label(self, text="Username")
l.size_hint_align = 0.0, 0.5
l.show()
puser = Entry(parent)
puser.size_hint_weight = EXPAND_HORIZ
puser.size_hint_align = FILL_HORIZ
puser.single_line = True
puser.scrollable = True
puser.entry = rfunc().username
puser.show()
t.pack(l, 0, 3, 1, 1)
t.pack(puser, 1, 3, 1, 1)
l = Label(self, text="Password")
l.size_hint_align = 0.0, 0.5
l.show()
ppass = Entry(parent)
ppass.size_hint_weight = EXPAND_HORIZ
ppass.size_hint_align = FILL_HORIZ
ppass.single_line = True
ppass.scrollable = True
ppass.password = True
ppass.entry = rfunc().password
ppass.show()
t.pack(l, 0, 4, 1, 1)
t.pack(ppass, 1, 4, 1, 1)
entries = [ptype, phost, pport, puser, ppass]
save = Button(parent, text="Apply")
save.callback_clicked_add(self.save_conf, wfunc, entries)
save.show()
t.pack(save, 0, 5, 2, 1)
self.content = t