why my text not change . when textfield is updated
bobwatcherx opened this issue · comments
bobwatcherx commented
why my txt2 not change this
mycode
from unigui import *
txt2 = Text('Text about dog')
def gantinama(_,value):
print(value)
txt2.value = value
eblock = Block('test',
[
Edit("ganti nama","",changed=gantinama),
]
)
config_area = [eblock,txt2]
Georgii Dernovyi commented
a handler has to return the changed object. so in your case it is
return txt2
config_area is not connected to 'blocks' variable of screen.
all gui objects has to be in blocks. In you case instead config_area write
blocks = [eblock]
or the same
config_area = [eblock]
blocks = config_area
eblock has to include txt2. or another block has.
So always logic structure is Screen -> blocks -> gui objects.