Jump to content

Recommended Posts

  • Active+ Member

Hi everyone, How can I use SetUpdateEvent call for EditLine object in Python?

Examp:

self.item_editline.SetUpdateEvent(ui.__mem_func__(self.OnUpdateItemEditLine))
self.item_editline.OnIMEReturn = ui.__mem_func__(self.SearchItensFunc)
self.item_editline.SetEscapeEvent(ui.__mem_func__(self.OnPressEscapeKey))

So when I type a character, I want it to automatically run the OnUpdateItemEditLine function.

(The required function is available in the ui.py file, but it still doesn't work.)

Edited by blaxis
Link to comment
https://metin2.dev/topic/30623-pythonhow-to-use-the-setupdateevent-call/
Share on other sites

  • Bot

Like this:
 

self.item_editline.OnIMEUpdate = ui.__mem_func__(self.OnUpdateItemEditLine)

And :
 

	def OnUpdateItemEditLine(self):
		ui.EditLine.OnIMEUpdate(self.item_editline)

		editLineText = self.item_editline.GetText()

 

  • Good 1

english_banner.gif

  • Active+ Member
2 hours ago, Abel(Tiger) said:

Like this:
 

self.item_editline.OnIMEUpdate = ui.__mem_func__(self.OnUpdateItemEditLine)

And :
 

	def OnUpdateItemEditLine(self):
		ui.EditLine.OnIMEUpdate(self.item_editline)

		editLineText = self.item_editline.GetText()

 

Thank you very much bro! It worked.

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.