Jump to content
  • 0

For Python experts..


ScreamMyName

Question

2 answers to this question

Recommended Posts

  • 0
On 15.05.2016 at 4:52 PM, Shang said:

self.txttooltip = uiToolTip.ToolTip()
self.txttooltip.AutoAppendTextLine(text)
self.txttooltip.HideToolTip()

self.image.SAFE_SetEvent("MOUSE_OVER_IN", self.txttooltip.ShowToolTip)
self.image.SAFE_SetEvent("MOUSE_OVER_OUT", self.txttooltip.HideToolTip)

It doesn't work for ImageBox class, but there's OnMouseOverIn / Out - I got problem (I want to add tooltip with itemdescription of material at uiRefine.py)

def ShowTip(self):
        self.txttooltip.ClearToolTip()
        self.txttooltip.AppendTextLine("Description")
        self.txttooltip.Show()
        
    def HideTip(self):
        self.txttooltip.Hide()

 

At def Open(): I initiate uiTooltip for self.txttooltip and further this code:

itemImage = self.__MakeItemImage()
        itemImage.SetParent(slot)
        item.SelectItem(vnum)
        itemImage.LoadImage(item.GetIconImageFileName())
        self.itemImage.OnMouseOverIn(self.ShowTip())
        self.itemImage.OnMouseOverOut(self.HideTip())

 

I got error:

TypeError
0528 20:17:26082 :: OnMouseOverIn() takes exactly 1 argument (2 given)

 

Anyone can help? I suck at python

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

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.