def ConstructTopRightCont(self): self.durationEdit = SinglelineEdit(parent=self.topRightCont, name='durationEdit', align=uiconst.TOPRIGHT, label='duration', floats=(0.0, 10.0), setvalue=self.duration, pos=(5, 14, 100, 0), OnChange=self.OnDurationEditChanged) self.loopsEdit = SinglelineEdit(parent=self.topRightCont, name='loopEdit', align=uiconst.TOPRIGHT, label='loops', ints=(-1, 20), setvalue=self.loops, pos=(5, 52, 100, 0), OnChange=self.OnLoopEditChanged) options = [ (funcName, getattr(uiconst, funcName)) for funcName in dir(uiconst) if funcName.startswith('ANIM_') and funcName != 'ANIM_LOOPCYCLE' ] self.curveTypeCombo = Combo(parent=self.topRightCont, label='curveType', options=options, name='', select=uiconst.ANIM_SMOOTH, pos=(5, 92, 100, 0), width=100, align=uiconst.TOPRIGHT)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.showNavigationBar = settings.user.ui.Get('browserShowNavBar', True) self.showStatusBar = settings.user.ui.Get('browserShowStatusBar', True) self.SetCaption(localization.GetByLabel('UI/Browser/BrowserSettings/BrowserSettingsCaption')) self.SetButtons(uiconst.OKCLOSE, okLabel=localization.GetByLabel('UI/Browser/BrowserSettings/SaveChanges'), okFunc=self.Save, okModalResult=uiconst.ID_NONE) main = self.GetMainArea() main.clipChildren = 0 main.padding = 6 c = Container(name='homeCont', parent=main, align=uiconst.TOTOP, height=32) l = Container(name='left', parent=c, align=uiconst.TOLEFT, width=100, state=uiconst.UI_PICKCHILDREN) r = Container(name='right', parent=c, align=uiconst.TORIGHT, width=80, state=uiconst.UI_PICKCHILDREN) text = Label(text=localization.GetByLabel('UI/Browser/BrowserSettings/Homepage'), align=uiconst.TOALL, state=uiconst.UI_DISABLED, parent=l, left=0, top=4, width=2) top = (text.textheight - 16) / 2 + 2 if text.textheight > 16 else 0 totalTop = top btn = Button(parent=r, label=localization.GetByLabel('UI/Browser/BrowserSettings/ResetHomepage'), func=self.ResetHomePage, pos=(0, top, 0, 0), align=uiconst.TOPRIGHT) if btn.width > 80: r.width = btn.width self.homeEdit = SinglelineEdit(name='homeEdit', setvalue=settings.user.ui.Get('HomePage2', browserutil.DefaultHomepage()), align=uiconst.TOTOP, pos=(0, top, 0, 0), parent=c) Line(parent=main, align=uiconst.TOTOP, color=(0.5, 0.5, 0.5, 0.75)) self.showHideContainer = Container(name='showHideContainer', parent=main, align=uiconst.TOTOP, height=35, top=0, state=uiconst.UI_PICKCHILDREN) self.showStatusBarCbx = Checkbox(text=localization.GetByLabel('UI/Browser/BrowserSettings/ShowStatusBar'), parent=self.showHideContainer, configName='', retval=0, checked=self.showStatusBar) self.showNavBarCbx = Checkbox(text=localization.GetByLabel('UI/Browser/BrowserSettings/ShowNavigationBar'), parent=self.showHideContainer, configName='', retval=0, checked=self.showNavigationBar) Line(parent=main, align=uiconst.TOTOP, color=(0.5, 0.5, 0.5, 0.75)) self.cacheContainer = Container(name='cacheContainer', parent=main, align=uiconst.TOTOP, height=26, top=8, state=uiconst.UI_PICKCHILDREN) l = Container(name='cacheLeft', parent=self.cacheContainer, align=uiconst.TOLEFT, width=100, state=uiconst.UI_PICKCHILDREN) r = Container(name='cacheRight', parent=self.cacheContainer, align=uiconst.TORIGHT, width=80, state=uiconst.UI_PICKCHILDREN) if not blue.win32.IsTransgaming(): text = Label(text=localization.GetByLabel('UI/Browser/BrowserSettings/CacheLocation'), align=uiconst.TOLEFT, state=uiconst.UI_DISABLED, parent=l, padding=(2, 4, 2, 4)) top = (text.textheight - 16) / 2 + 2 if text.textheight > 16 else 0 totalTop += top btn = Button(parent=r, label=localization.GetByLabel('UI/Browser/BrowserSettings/ResetCacheLocation'), func=self.ResetCacheLocation, pos=(0, top, 0, 0), align=uiconst.TOPRIGHT) if btn.width > r.width: r.width = btn.width if text.textwidth > l.width: l.width = text.textwidth + 4 self.cacheEdit = SinglelineEdit(name='cacheEdit', setvalue=settings.public.generic.Get('BrowserCache', corebrowserutil.DefaultCachePath()), align=uiconst.TOTOP, pos=(0, top, 0, 0), parent=self.cacheContainer) explainContainer = Container(name='cacheExplainContainer', parent=main, align=uiconst.TOTOP, height=26) Label(text=localization.GetByLabel('UI/Browser/BrowserSettings/CacheCaption'), align=uiconst.TOALL, state=uiconst.UI_DISABLED, parent=explainContainer, padLeft=4, fontsize=10) totalTop += 26 clearCacheContainer = Container(name='clearCacheContainer', parent=main, align=uiconst.TOTOP, height=14) btn = Button(parent=clearCacheContainer, label=localization.GetByLabel('UI/Browser/BrowserSettings/ClearCache'), func=self.ClearCache) btn.hint = (localization.GetByLabel('UI/Browser/BrowserSettings/ClearCacheHint'),) totalTop += 16 else: totalTop -= 32 self.SetMinSize((500, 204 + totalTop)) sm.StartService('sites')
def ConstructMainCont(self): self.spriteCont.Flush() self.mainItem = None self.mainTransform = None self.mainSprite = None self.codeEdit = None if self.mode is MODE_NORMAL: self.mainTransform = Transform(parent=self.spriteCont, align=uiconst.CENTER, pos=(0, 0, 128, 128)) self.mainSprite = Sprite( parent=self.mainTransform, align=uiconst.CENTER, pos=(0, 0, 128, 128), texturePath='res:/UI/Texture/CorpLogoLibs/419.png', texturePathSecondary='res:/UI/Texture/colorgradient.dds') elif self.mode is MODE_CODE: self.codeEdit = SinglelineEdit( parent=self.spriteCont, align=uiconst.TOTOP, label='Code that returns a UI object:', heigt=15, padding=(10, 30, 150, 0), setvalue=settings.user.ui.Get('TestAnimationsWndCode', 'uicore.layer.sidePanels')) Button(parent=self.spriteCont, align=uiconst.TOPLEFT, label='Assign result', top=60, left=5, func=self.OnAssignCodeBtn) elif self.mode is MODE_INPUT: self.mainItem = self.inputObj
def AskName(caption=None, label=None, setvalue='', maxLength=None, passwordChar=None, validator=None): import carbonui.const as uiconst import localization from carbonui.control.singlelineedit import SinglelineEditCoreOverride as SinglelineEdit from carbonui.control.label import LabelOverride as Label if caption is None: caption = localization.GetByLabel('UI/Common/Name/TypeInName') if label is None: label = localization.GetByLabel('UI/Common/Name/TypeInName') wnd = GetFormWindow(caption) if label: Label(parent=wnd.sr.content, text=label, align=uiconst.TOTOP, pos=(0, 0, 0, 0)) edit = SinglelineEdit(parent=wnd.sr.content, maxLength=maxLength, setvalue=setvalue) AddFormControl(wnd, edit, 'name', retval=None, required=True, errorcheck=validator or NamePopupErrorCheck) if wnd.ShowModal() == uiconst.ID_OK: return wnd.result
def AskAmount(caption=None, question=None, setvalue='', intRange=None, floatRange=None): import carbonui.const as uiconst from carbonui.control.singlelineedit import SinglelineEditCoreOverride as SinglelineEdit from carbonui.control.label import LabelOverride as Label if caption is None: caption = 'How much?' if question is None: question = 'How much?' wnd = GetFormWindow(caption) if question: Label(parent=wnd.sr.content, text=question, align=uiconst.TOTOP, pos=(0, 0, 0, 0)) edit = SinglelineEdit(parent=wnd.sr.content, ints=intRange, floats=floatRange, setvalue=setvalue) AddFormControl(wnd, edit, 'amount', retval=None, required=True, errorcheck=None) if wnd.ShowModal() == uiconst.ID_OK: return wnd.result
def Create_text(self, attrs): from carbonui.control.singlelineedit import SinglelineEditCoreOverride as SinglelineEdit wnd = SinglelineEdit(name='textedit', align=uiconst.RELATIVE, pos=(0, 0, getattr(attrs, 'width', None) or min(200, 7 * (attrs.size or 30)), 16)) return wnd
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) name = attributes.bookmarkName url = attributes.url self.SetCaption(localization.GetByLabel('UI/Browser/EditBookmarks/Caption')) self.SetButtons(uiconst.OKCLOSE, okLabel=localization.GetByLabel('UI/Browser/EditBookmarks/Remove', selectedItems=0), okFunc=self.Remove, okModalResult=uiconst.ID_NONE) self.SetMinSize((256, 256)) main = self.GetMainArea() main.clipChildren = 0 Container(name='errorParent', parent=main, align=uiconst.TOBOTTOM, height=16, state=uiconst.UI_HIDDEN) toppar = Container(name='toppar', align=uiconst.TOTOP, height=66, parent=main, idx=0, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) c = Container(name='namecont', parent=toppar, align=uiconst.TOTOP, height=20, padBottom=5) label = Label(text=localization.GetByLabel('UI/Browser/EditBookmarks/Name'), fontsize=9, letterspace=2, state=uiconst.UI_DISABLED, parent=c, align=uiconst.CENTERLEFT, left=4) edit = SinglelineEdit(name='nameEdit', parent=c, align=uiconst.CENTERLEFT, width=150) edit.OnReturn = self.OnEnter self.nameEdit = edit c = Container(name='urlcont', parent=toppar, align=uiconst.TOTOP, height=20, padBottom=5) label2 = Label(text=localization.GetByLabel('UI/Browser/EditBookmarks/URL'), fontsize=9, letterspace=2, state=uiconst.UI_DISABLED, parent=c, align=uiconst.CENTERLEFT, left=4, uppercase=True) edit = SinglelineEdit(name='urlEdit', parent=c, align=uiconst.CENTERLEFT, width=150) edit.OnReturn = self.OnEnter self.urlEdit = edit self.nameEdit.left = self.urlEdit.left = max(35, label.textwidth + 6, label2.textwidth + 6) b = Button(parent=toppar, label=localization.GetByLabel('UI/Browser/EditBookmarks/Add'), func=self.OnEnter, align=uiconst.BOTTOMRIGHT) editBtn = Button(parent=toppar, label=localization.GetByLabel('UI/Browser/EditBookmarks/Edit'), pos=(b.width + const.defaultPadding, 0, 0, 0), func=self.OnEdit, align=uiconst.BOTTOMRIGHT) editBtn.state = uiconst.UI_HIDDEN self.editBtn = editBtn name = StripTags(name).strip() if name: self.nameEdit.SetValue(name) if url: self.urlEdit.SetValue(url) self.scroll = Scroll(parent=main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) sm.GetService('sites') self.RefreshSites()
def PrepareNavigationBar(self): mainArea = self.GetMainArea() self.navigationBar = Container(name='navBar', parent=mainArea, align=uiconst.TOTOP, height=24, padBottom=4) buttonParent = Container(name='buttonParent', parent=self.navigationBar, align=uiconst.TORIGHT, padRight=const.defaultPadding) goBtn = Button(parent=buttonParent, label=localization.GetByLabel('UI/Browser/Go'), func=self.OnGoBtn, align=uiconst.CENTER) buttonParent.width = goBtn.width iconContainer = Container(name='sslIndicator', parent=self.navigationBar, align=uiconst.TORIGHT, width=20, padRight=const.defaultPadding) Sprite(name='sslIcon', texturePath='res:/UI/Texture/classes/Browser/sslIcon.png', parent=iconContainer, pos=(-2, -1, 24, 24), hint=localization.GetByLabel('UI/Browser/SecureConnection'), ignoreSize=True, state=uiconst.UI_NORMAL) self.sslIconContainer = iconContainer self.urlInput = SinglelineEdit(name='urlInput', parent=self.navigationBar, padTop=1, padRight=const.defaultPadding, maxLength=1630, autoselect=True, align=uiconst.TOTOP) self.urlInput.OnReturn = self.BrowseTo self.urlInput.OnHistoryClick = self.OnHistoryClicked
def ApplyAttributes(self, attributes): super(EntityBrowserCore, self).ApplyAttributes(attributes) self.SetHeight(self.default_height) self.SetCaption('Entity Browser') if not session.role & service.ROLE_QA: Label( text= 'Viewing the entity window is restricted to users with QA privileges', align=uiconst.TOTOP, parent=self.sr.content) return self.entityClient = sm.GetService('entityClient') self.sr.content.padding = 5 self.sr.content.searchEntryLabel = Label(parent=self.sr.content, align=uiconst.TOPLEFT, top=14, text='Entity ID: ') self.sr.content.searchEntry = SinglelineEdit( parent=self.sr.content, align=uiconst.TOPLEFT, top=14, left=self.sr.content.searchEntryLabel.width + 10, width=200) self.sr.content.searchButton = Button( parent=self.sr.content, align=uiconst.TOPLEFT, top=14, left=self.sr.content.searchEntry.left + self.sr.content.searchEntry.width + 20, label='View Entity', func=self.ViewEntityButtonFunc) self.sr.content.filterEntryLabel = Label( parent=self.sr.content, align=uiconst.TOPLEFT, top=self.sr.content.searchButton.top + self.sr.content.searchButton.height + 2, text='Component Filters: ') self.sr.content.filterEntry = SinglelineEdit( parent=self.sr.content, align=uiconst.TOPLEFT, hinttext='Comma separated component names', OnReturn=self.FilterEntitiesFunc, left=self.sr.content.filterEntryLabel.width + 10, top=self.sr.content.searchButton.top + self.sr.content.searchButton.height + 2, width=300) filterButton = Button(parent=self.sr.content, align=uiconst.TOPLEFT, left=self.sr.content.filterEntry.left + self.sr.content.filterEntry.width + 20, top=self.sr.content.searchButton.top + self.sr.content.searchButton.height + 2, label='Filter Entities', func=self.FilterEntitiesFunc) self.SetMinSize( [filterButton.left + filterButton.width + 10, self.default_height]) self.sceneNodes = {} self.sceneDataNodes = {} self.componentFilters = [] self.sr.content.scroll = Scroll(parent=self.sr.content, padTop=filterButton.top + filterButton.height + 2) self.thread = uthread.new(self.LoadScenesThread)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) initialUrl = attributes.initialUrl self.SetCaption(localization.GetByLabel('UI/Browser/TrustedSites')) self.SetMinSize((368, 300)) mainArea = self.GetMainArea() mainArea.top = 2 self.inputContainer = Container(name='inputContainer', parent=mainArea, align=uiconst.TOTOP, height=50) self.bodyContainer = Container(name='bodyContainer', parent=mainArea, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.trustContainer = Container(name='trustContainer', parent=self.bodyContainer, align=uiconst.TOTOP, height=76) self.ignoreContainer = Container(name='ignoreContainer', parent=self.bodyContainer, align=uiconst.TOBOTTOM, height=76) urlInputContainer = Container(name='urlInputContainer', parent=self.inputContainer, align=uiconst.TOTOP, height=22, top=3) inputButtonContainer = Container(name='urlInputButtonContainer', parent=self.inputContainer, align=uiconst.TOBOTTOM, height=20, padRight=4) self.urlText = Label( text=localization.GetByLabel('UI/Browser/EditBookmarks/URL'), parent=urlInputContainer, align=uiconst.TOLEFT, padLeft=6, state=uiconst.UI_DISABLED, uppercase=1, fontsize=10, letterspace=1) self.urlInput = SinglelineEdit(name='urlInput', parent=urlInputContainer, align=uiconst.TOTOP, padRight=const.defaultPadding, padLeft=const.defaultPadding) self.trustBtn = Button( parent=inputButtonContainer, label=localization.GetByLabel('UI/Browser/TrustSite'), align=uiconst.TORIGHT, padLeft=4, padBottom=3, func=self.TrustSite) self.trustBtn.hint = localization.GetByLabel( 'UI/Browser/TrustManagementTrustHint') self.ignoreBtn = Button( parent=inputButtonContainer, label=localization.GetByLabel('UI/Browser/IgnoreSite'), align=uiconst.TORIGHT, padLeft=4, padBottom=3, func=self.IgnoreSite) self.ignoreBtn.hint = localization.GetByLabel( 'UI/Browser/TrustManagementIgnoreHint') trustBtnContainer = Container(name='trustBtnContainer', parent=self.trustContainer, align=uiconst.TOBOTTOM, height=22, padRight=4) trustRemoveBtn = Button( parent=trustBtnContainer, label=localization.GetByLabel('UI/Commands/Remove'), align=uiconst.TORIGHT, padLeft=4, padBottom=3, func=self.RemoveTrustedSite) trustRemoveBtn.hint = localization.GetByLabel( 'UI/Browser/TrustManagementRemoveTrustHint') trustTextContainer = Container(name='trustTextContainer', parent=self.trustContainer, align=uiconst.TOTOP, height=14) Label(text=localization.GetByLabel('UI/Browser/TrustedSites'), parent=trustTextContainer, state=uiconst.UI_DISABLED, fontsize=10, left=10, top=3) trustScrollContainer = Container(name='trustScrollContainer', parent=self.trustContainer, align=uiconst.TOALL) self.trustScroll = Scroll( parent=trustScrollContainer, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) ignoreBtnContainer = Container(name='ignoreBtnContainer', parent=self.ignoreContainer, align=uiconst.TOBOTTOM, height=22, padRight=4) ignoreRemoveBtn = Button( parent=ignoreBtnContainer, label=localization.GetByLabel('UI/Commands/Remove'), align=uiconst.TORIGHT, padLeft=4, padBottom=3, func=self.RemoveIgnoredSite) ignoreRemoveBtn.hint = localization.GetByLabel( 'UI/Browser/TrustManagementRemoveIgnoredHint') ignoreTextContainer = Container(name='ignoreTextContainer', parent=self.ignoreContainer, align=uiconst.TOTOP, height=14) Label(text=localization.GetByLabel('UI/Browser/IgnoredSites'), parent=ignoreTextContainer, state=uiconst.UI_DISABLED, fontsize=10, left=10, top=3) ignoreScrollContainer = Container(name='ignoreScrollContainer', parent=self.ignoreContainer, align=uiconst.TOALL) self.ignoreScroll = Scroll( parent=ignoreScrollContainer, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.inited = 1 self.sitesSvc = sm.GetService('sites') self.RefreshSites() if initialUrl is not None: self.urlInput.SetValue(initialUrl)
def ApplyAttributes(self, attributes): Window.ApplyAttributes(self, attributes) self.SetMinSize((500, 300)) main = self.GetMainArea() main.clipChildren = True options = Container(parent=main, align=uiconst.TOLEFT, width=180, padTop=4, padLeft=5) fontsParent = Container(parent=options) flagsParent = Container(parent=options) tabs = uicontrols.TabGroup(parent=options, tabs=[('Fonts', fontsParent, self, 'properties'), ('Load Flags', flagsParent, self, 'flags')], padBottom=6, idx=0) for each in (STYLECLASSES, CLIENTFONTS, WINDOWSFONTS): Checkbox(parent=fontsParent, text='Browse ' + each, groupname='browseType', checked=each == STYLECLASSES, callback=self.OnBrowseTypeChange, retval=each) import uicls clientLabelClasses = [] for className, cls in uicls.__dict__.iteritems(): try: if issubclass(cls, LabelCore) and cls is not LabelCore and getattr(cls, '__guid__', None) is not None: clientLabelClasses.append((className, (className, cls))) except: pass clientLabelClasses = SortListOfTuples(clientLabelClasses) self.styleClassesLabel = Label(parent=fontsParent, text='Style Classes', align=uiconst.TOTOP, padTop=10) self.styleClassesCombo = Combo(parent=fontsParent, align=uiconst.TOTOP, options=clientLabelClasses, callback=self.OnStyleClassChange) clientFaces = [] clientFonts = os.listdir(blue.paths.ResolvePathForWriting(u'res:') + '\\UI\\Fonts') clientFonts.sort() for fontName in clientFonts: if fontName.lower().endswith('.ttf') or fontName.lower().endswith('.otf'): clientFaces.append((fontName, 'res:/UI/Fonts/' + fontName)) self.clientFontsLabel = Label(parent=fontsParent, text='Client Fonts', align=uiconst.TOTOP, padTop=10) self.clientFontsCombo = typeFaceCombo = Combo(parent=fontsParent, align=uiconst.TOTOP, options=clientFaces, callback=self.OnTypeFaceChange) windowsFaces = [] windowsFonts = os.listdir(blue.win32.SHGetFolderPath(blue.win32.CSIDL_FONTS)) windowsFonts.sort() for fontName in windowsFonts: if fontName.lower().endswith('.ttf') or fontName.lower().endswith('.otf'): windowsFaces.append((fontName, blue.win32.SHGetFolderPath(blue.win32.CSIDL_FONTS) + '\\' + fontName)) self.windowsFontsLabel = Label(parent=fontsParent, text='Windows Fonts', align=uiconst.TOTOP, padTop=10) self.windowsFontsCombo = typeFaceCombo = Combo(parent=fontsParent, align=uiconst.TOTOP, options=windowsFaces, callback=self.OnTypeFaceChange) Label(parent=fontsParent, text='Fontsize', align=uiconst.TOTOP, padTop=10) self.fontSizeEdit = SinglelineEdit(ints=(6, 128), parent=fontsParent, align=uiconst.TOTOP, OnChange=self.OnFontSizeChange, setvalue=unicode(Label.default_fontsize)) Label(parent=fontsParent, text='Letterspace', align=uiconst.TOTOP, padTop=10) self.letterSpaceEdit = SinglelineEdit(ints=(-10, 10), parent=fontsParent, align=uiconst.TOTOP, OnChange=self.OnLetterSpaceChange, setvalue=unicode(Label.default_letterspace)) Label(parent=fontsParent, text='LineSpacing', align=uiconst.TOTOP, padTop=10) self.lineSpacingEdit = SinglelineEdit(floats=(-1.0, 1.0, 2), parent=fontsParent, align=uiconst.TOTOP, OnChange=self.OnLineSpacingChange, setvalue=unicode(0.0)) current = trinity.fontMan.loadFlag self.loadFlagCheckBoxes = [] for flagName, flagValue in loadFlags: active = current & flagValue == flagValue cb = Checkbox(parent=flagsParent, align=uiconst.TOTOP, text=flagName.replace('FT_LOAD_', ''), callback=self.OnLoadFlagChange, retval=flagValue, checked=active) cb.flagName = flagName cb.flagValue = flagValue self.loadFlagCheckBoxes.append(cb) Label(parent=flagsParent, text='Render flags', align=uiconst.TOTOP, padTop=10) self.renderFlagCheckBoxes = [] for flagName, flagValue in renderFlags: active = current & flagValue == flagValue cb = Checkbox(parent=flagsParent, align=uiconst.TOTOP, text=flagName.replace('FT_RENDER_MODE_', ''), groupname='renderFlag', callback=self.OnRenderFlagChange, retval=flagValue, checked=active) cb.flagName = flagName cb.flagValue = flagValue self.renderFlagCheckBoxes.append(cb) sampleSelectionParent = Container(parent=main, align=uiconst.TOTOP, height=38, padTop=20) Line(parent=main, align=uiconst.TOTOP, padTop=10, padRight=10, padLeft=10) self.sampleCombo = Combo(parent=sampleSelectionParent, align=uiconst.TOPLEFT, width=100, left=10, options=[('Lorem...', samplText), ('Ansi charset', ANSI), ('Cyrillic charset', CYRILLIC)], callback=self.OnSampleComboChange) orlabel = Label(parent=sampleSelectionParent, text='-or-', left=self.sampleCombo.left + self.sampleCombo.width + 5) self.sampleInput = EditPlainText(parent=sampleSelectionParent, align=uiconst.TOALL, padLeft=140, padRight=10, text='asdf sfdasfasfdasfd safd') self.sampleInput.OnChange = self.OnCustomTextChange self.samples = [] for typeFace in clientFonts[:1]: sampl = Label(parent=main, align=uiconst.TOTOP, text=samplText, padding=10) self.samples.append(sampl) self.LoadBrowseType(STYLECLASSES)