def UpdateLabel(self, new=0): label = uix.GetItemLabel(self.rec, self.sr.node, new) if self.sr.node.viewMode in ('list', 'details'): self.sr.label.text = label return self.sr.label.text = label quantity = uix.GetItemQty(self.sr.node, 'ss') if self.rec.singleton or self.rec.typeID in (const.typeBookmark, ): if self.sr.qtypar: self.sr.qtypar.Close() self.sr.qtypar = None return if not self.sr.qtypar: self.sr.qtypar = uiprimitives.Container(parent=self, idx=0, name='qtypar', pos=(0, 53, 32, 11), align=uiconst.TOPRIGHT, state=uiconst.UI_DISABLED, bgColor=(0, 0, 0, 0.95)) self.sr.quantity_label = uicontrols.Label(parent=self.sr.qtypar, left=2, maxLines=1, fontsize=9) self.sr.quantity_label.text = quantity
def OnPostCfgDataChanged(self, what, data): if what == 'evelocations': itemID = data[0] for each in self.scroll.GetNodes(): if each and getattr(each, 'item', None) and each.item.itemID == itemID: each.name = None uix.GetItemLabel(each.item, each, 1) if each.panel: each.panel.UpdateLabel() return
def GetCopyData(cls, node): label = uix.GetItemLabel(node.rec, node) return label + cls.GetExtraColumnsText(node)
def PreLoad(node): if node.viewMode in ('list', 'details'): label = uix.GetItemLabel(node.item, node)