本文整理汇总了Python中BaseCompanions.CollectionDTC.moveItem方法的典型用法代码示例。如果您正苦于以下问题:Python CollectionDTC.moveItem方法的具体用法?Python CollectionDTC.moveItem怎么用?Python CollectionDTC.moveItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseCompanions.CollectionDTC
的用法示例。
在下文中一共展示了CollectionDTC.moveItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: moveItem
# 需要导入模块: from BaseCompanions import CollectionDTC [as 别名]
# 或者: from BaseCompanions.CollectionDTC import moveItem [as 别名]
def moveItem(self, idx, dir):
newIdx = CollectionDTC.moveItem(self, idx, dir)
if newIdx != idx:
title = self.control.GetLabelTop(idx)
menu = self.control.Remove(idx)
self.control.Insert(newIdx, menu, title)
return newIdx
示例2: moveItem
# 需要导入模块: from BaseCompanions import CollectionDTC [as 别名]
# 或者: from BaseCompanions.CollectionDTC import moveItem [as 别名]
def moveItem(self, idx, dir):
newIdx = CollectionDTC.moveItem(self, idx, dir)
if newIdx != idx:
li = self.control.GetColumn(idx)
text = li.GetText()
self.control.DeleteColumn(idx)
self.control.InsertColumnInfo(newIdx, li)
self.control.SetColumn(newIdx, li) # doesn't update without this
return newIdx
示例3: moveItem
# 需要导入模块: from BaseCompanions import CollectionDTC [as 别名]
# 或者: from BaseCompanions.CollectionDTC import moveItem [as 别名]
def moveItem(self, idx, dir):
newIdx = CollectionDTC.moveItem(self, idx, dir)
if newIdx != idx:
focus = self.control.GetSelection() == idx
text = self.control.GetPageText(idx)
img = self.control.GetPageImage(idx)
page = self.control.GetPage(idx)
if self.control.RemovePage(idx):
self.control.InsertPage(newIdx, page, text, focus, img)
return newIdx
示例4: moveItem
# 需要导入模块: from BaseCompanions import CollectionDTC [as 别名]
# 或者: from BaseCompanions.CollectionDTC import moveItem [as 别名]
def moveItem(self, idx, dir):
newIdx = CollectionDTC.moveItem(self, idx, dir)
if newIdx != idx:
self.recreateSizers()
return newIdx