本文整理匯總了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)