Fri, Apr 19, 6:28 PM CDT

Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Mar 19 1:03 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Subject: 'BitmapButton' object has no attribute 'SetBitmapHover


structure ( ) posted Thu, 19 November 2020 at 1:52 PM · edited Fri, 05 April 2024 at 3:25 PM
Forum Coordinator

I have the following code ( which works fine in 2.7 ) however, I am unable to find a way to correct the error

AttributeError: 'BitmapButton' object has no attribute 'SetBitmapHover'

            self.toolBar[v] = wx.BitmapButton(self, self.tmpId, self.tmpImage, name="", wx.Size(21, 21), wx.BORDER_NONE | wx.EXPAND)
            self.tmpImage = wx.Image(self.imgHigh[v], wx.BITMAP_TYPE_PNG).ConvertToBitmap()
            self.toolBar[v].SetBitmapHover(self.tmpImage)

any ideas would be appreciated.

Locked Out


Dizzi ( ) posted Thu, 19 November 2020 at 2:10 PM

Use SetBitmapCurrent.

https://wxpython.org/Phoenix/docs/html/wx.AnyButton.html



structure ( ) posted Thu, 19 November 2020 at 2:27 PM
Forum Coordinator

thank you, that cured the error

Locked Out


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.