Jump to content

SetCloseEvent doesn't work with self.GetChild


Recommended Posts

  • Active Member

Hey guys,

is here someone who know how to fix this close event?

Function:

self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))

is placed in:

def __CreateDialog(self):

and where's the problem?

Problem is when I use close button generated on TitleBar child. I can use it only one time (on every time when client is loaded, so when's the app started), then I cannot drop anything from my inventory.

If someone know how to fix it, I'll be really glad for solution :)

Thanks for answers!

Sincerely,

ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
  • 2 weeks later...
  • Active Member

@Kenzy Deep 

Spoiler

def __CreateDialog(self):
		pyScrLoader = ui.PythonScriptLoader()
		pyScrLoader.LoadScriptFile(self, "uiscript/questiondialogitem.py")

		self.tooltipItem = uiToolTip.ItemToolTip()

		self.board = self.GetChild("board")
		self.textLine = self.GetChild("message")
		self.acceptButton = self.GetChild("accept")
		self.destroyButton = self.GetChild("destroy")
		self.cancelButton = self.GetChild("cancel")

		self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))

 

 

I'll be always helpful! 👊 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.