def getScrollingElement(self, rowCount): """ Get a L{ScrollingElement} """ s = Store() for x in xrange(rowCount): SampleRowItem(value=(x + 1) * 50, store=s) scrollingElement = ScrollingElement(s, SampleRowItem, None, (SampleRowItem.value, ), None, True, FakeTranslator(s)) scrollingElement.setFragmentParent(self) scrollingElement.docFactory = getLoader(scrollingElement.fragmentName) return scrollingElement
def getScrollingElement(self, rowCount): """ Get a L{ScrollingElement} """ s = Store() for x in xrange(rowCount): SampleRowItem(value=(x + 1) * 50, store=s) scrollingElement = ScrollingElement( s, SampleRowItem, None, (SampleRowItem.value,), None, True, FakeTranslator(s)) scrollingElement.setFragmentParent(self) scrollingElement.docFactory = getLoader( scrollingElement.fragmentName) return scrollingElement
def scroller(): """ Create a scrolling element with a large number of rows for use in an interactive demonstration. """ aStore = Store() populate(aStore) se = ScrollingElement(aStore, Sample, None, [Sample.quantity, Sample.date, Sample.title, SampleColorWidgetColumn()], webTranslator=FakeTranslator(aStore), defaultSortAscending=False) se.docFactory = getLoader(se.fragmentName) return se
def scroller(): """ Create a scrolling element with a large number of rows for use in an interactive demonstration. """ aStore = Store() populate(aStore) se = ScrollingElement(aStore, Sample, None, [ Sample.quantity, Sample.date, Sample.title, SampleColorWidgetColumn() ], webTranslator=FakeTranslator(aStore), defaultSortAscending=False) se.docFactory = getLoader(se.fragmentName) return se