本文整理汇总了Python中higwidgets.higtables.HIGTable.get_children方法的典型用法代码示例。如果您正苦于以下问题:Python HIGTable.get_children方法的具体用法?Python HIGTable.get_children怎么用?Python HIGTable.get_children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类higwidgets.higtables.HIGTable
的用法示例。
在下文中一共展示了HIGTable.get_children方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BoxEditable
# 需要导入模块: from higwidgets.higtables import HIGTable [as 别名]
# 或者: from higwidgets.higtables.HIGTable import get_children [as 别名]
#.........这里部分代码省略.........
t.set_profileoption(po)
t.pack_start(eventbox)
t.pack_start(tmp_widget)
#t.drag_source_set(gtk.gdk.BUTTON1_MASK |
#gtk.gdk.BUTTON3_MASK,
#target,
#gtk.gdk.ACTION_COPY |
#gtk.gdk.ACTION_MOVE)
#t.connect('drag_data_get', self.source_drag_data_get)
#XXX : I think that is very important ( I only comment to get focus)
if self._old_po!=None:
self._old_po.set_next_opt(i.get_label())
self._old_po = po
t.set_flags( t.flags() | gtk.CAN_FOCUS)
t.connect('button-press-event', self._button_press_event)
t.connect('key-press-event', self._key_press_event)
t.set_name(i.get_label())
t.connect('drag_data_received', self.drag_received)
t.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1],
gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE)
self._table.attach(t, 0,2, k,k+1)
self._coords[t] = [k, k+1]
self._x = k
self._y = k+1
k =k +1
self._last = t
def delete_on_item(self, widget):
if not widget.is_voidplace():
# remove widgets like checkbuttons or others and put voidplace
childs = widget.get_children()
cmd = CommandAddRemoveOption(widget,childs,
self._profilecore,self, False)
widget.set_select(False)
command_manager.add_command(cmd)
log.debug(' Remove Widgets like CheckButtons or others and put voidplace')
else:
# remove voidplace and delete the widget from table/box
#XXX
cmd = CommandAddRemoveVoidplace(self,
widget, self._coords, False)
#widget.unload_voidplace()
command_manager.add_command(cmd)
log.debug('Remove voidplace and delete the widget from table')
self._parent.emit('need-save', 'Sent', None)
def _key_press_event(self, widget, event):
_keyval = gtk.gdk.keyval_name(event.keyval)
if _keyval == "Delete" and self._old_selected!=None :
self.delete_on_item(widget)
#self._table.remove(widget)
#childs = self._table.get_children()
#for i in childs:
#if i.is_voidplace():
#i.do_resize_voidplace()
def _button_press_event(self,widget, event):
widget.set_select(True)