You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another strange occurrence with the Form widget, but in my GUI I have 9 different cells (pictured below), and whenever I click on the form in either Form near the grid of image renders (henceforth called Character Selectors), it won't let me unfocus the Form unless I press Enter. If I double-click anywhere on the window when this occurs, it will highlight whatever's in the Form for some reason.
The code for this Form is as follows:
classForm(TextInput):
classLabel(glooey.EditableLabel):
custom_font_name="Segoe UI"custom_font_size=10custom_color="#000000"custom_selection_color="#ffffff"custom_selection_background_color="#3390ff"custom_padding=2# SIDE_MODE is a global for how large the window isifGlobals.SIZE_MODE=="1920x1080":
custom_size_hint= (160, 20)
else:
custom_size_hint= (80, 20)
defon_insert_text(self, start, text):
self._text=self._layout.document.text# Gets a list of buttons from a parent widgetbuttons=self.parent.parent.parent._buttonsiftext!="":
i=0length=len(self.parent.parent.parent.character_list)
character_list=self.parent.parent.parent.character_listforbuttoninbuttons:
whileTrue:
ifi>=length:
button.hide()
breakcharacter_name=character_list[i]
ifself._text.lower() incharacter_name.lower():
button._foreground.set_text(character_name)
button.unhide()
i+=1breaki+=1else:
forbuttoninbuttons:
button.hide()
self.dispatch_event('on_edit_text', self)
defon_delete_text(self, start, text):
self.on_insert_text(start, text)
defon_unfocus(self, w):
# Goes to a parent widget and calls a function based on the form's textself.parent.parent.parent.changeCharacter(self._label._text)
...where TextInput is the default custom Form class I created. Any ideas as to what could be causing this?
The text was updated successfully, but these errors were encountered:
Ok, I finally got around to this today, but unfortunately I wasn't able to reproduce the behavior you described. Can you make a minimal working example that exhibits the bug?
Another strange occurrence with the
Form
widget, but in my GUI I have 9 different cells (pictured below), and whenever I click on the form in eitherForm
near the grid of image renders (henceforth called Character Selectors), it won't let me unfocus theForm
unless I press Enter. If I double-click anywhere on the window when this occurs, it will highlight whatever's in theForm
for some reason.The code for this
Form
is as follows:...where
TextInput
is the default customForm
class I created. Any ideas as to what could be causing this?The text was updated successfully, but these errors were encountered: