明文编辑

2024-06-26 16:53:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要一个编辑热线的帮助。我正试图在editline内设置一个文本,当您按editline内的文本时,该文本将被清除,您可以写入。
有人能帮我吗?我理解这个错误,但我不知道如何做不同的。你知道吗

BindObject - :'EditLine' object has no attribute 'SetEvent'

self.name = self.GetChild("name")

def LoadName(self):
    self.name.SetText("Your Name Here")

            {
                "name" : "naming", 
                "type" : "expanded_image",
                "style" : ("attach",),

                "x" : 12, 
                "y" : 78, 

                "image" : "d:/ymir work/ui/img.tga",

                "children" :
                (
                    {
                        "name" : "name",
                        "type" : "editline",

                        "x" : 11,
                        "y" : 28,

                        "width" : 129,
                        "height" : 16,

                        "input_limit" : 20,

                        #"text" : uiScriptLocale.WHISPER_NAME,
                    },
                ),
            },

Tags: nonameimage文本self编辑objecttype