本文整理汇总了Python中kiwi.ui.widgets.entry.ProxyEntry.update方法的典型用法代码示例。如果您正苦于以下问题:Python ProxyEntry.update方法的具体用法?Python ProxyEntry.update怎么用?Python ProxyEntry.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.ui.widgets.entry.ProxyEntry
的用法示例。
在下文中一共展示了ProxyEntry.update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_entry
# 需要导入模块: from kiwi.ui.widgets.entry import ProxyEntry [as 别名]
# 或者: from kiwi.ui.widgets.entry.ProxyEntry import update [as 别名]
def _create_entry(self, mandatory=False):
entry = ProxyEntry()
entry.data_type = unicode
# Set as empty or kiwi will return ValueUnset on entry.read()
# and we would have to take that in consideration everywhere here
entry.update(u'')
entry.mandatory = mandatory
self.setup_entry(entry)
entry.connect_after('content-changed',
self._after_entry__content_changed)
entry.connect_after('changed', self._after_entry__changed)
entry.connect('validate', self._on_entry__validate)
entry.connect('activate', self._on_entry__activate)
return entry
示例2: ProxyLabel
# 需要导入模块: from kiwi.ui.widgets.entry import ProxyEntry [as 别名]
# 或者: from kiwi.ui.widgets.entry.ProxyEntry import update [as 别名]
(42, int),
(22.0/7.0, float),
(3000L, long),
('THX', str),
(datetime.datetime.now(), datetime.datetime),
(datetime.date.today(), datetime.date),
(datetime.time(11, 38, 00), datetime.time),
(currency('50.1'), currency),
]
for data, data_type in data_types:
hbox = gtk.HBox(True)
vbox.pack_start(hbox, False, False, 6)
label = ProxyLabel(data_type.__name__.capitalize())
label.set_bold(True)
hbox.pack_start(label)
label = ProxyLabel(data_type=data_type)
label.update(data)
hbox.pack_start(label, False, False, 6)
entry = ProxyEntry(data_type=data_type)
entry.update(data)
entry.validate()
hbox.pack_start(entry, False, False, 6)
window.show_all()
gtk.main()
示例3: testCorrectlySetsEmptyString
# 需要导入模块: from kiwi.ui.widgets.entry import ProxyEntry [as 别名]
# 或者: from kiwi.ui.widgets.entry.ProxyEntry import update [as 别名]
def testCorrectlySetsEmptyString(self):
entry = ProxyEntry()
entry.update('')
self.assertEqual(entry.read(), '')