Add Help Info to a UI Custom Button ?

On 15/11/2016 at 16:09, xxxxxxxx wrote:

hi  guys, 
I was wondering how i can add the help info to the ui custom button that is added in a GeDialog, and it pop up like when you put your mouse over the button or plugin button and the info show up on what it do.

helpInfo = "This Add a Sweep to your 3D Scene"     # Want this to show up when mose over it
  
bc = c4d.BaseContainer()
path = os.path.join(os.path.dirname(__file__), "res/UI_Icons", "UI_B1.png")  #The path to the image 
bc.SetFilename(GEN_BUTTON, path)  #Add this location info to the conatiner 
bc.SetLong(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_NONE) #Sets the border to look like a button
self.myBitButton=self.AddCustomGui(GEN_BUTTON, c4d.CUSTOMGUI_BITMAPBUTTON, helpInfo, c4d.BFH_CENTER | c4d.BFV_CENTER, 78, 0, bc)
self.myBitButton.SetImage(path, True)  #Add the image to the button

If I cannot do that , is there a way to add a Plugin  or a Plugin ID to a button or part of the the GUI layout GeDialog then.

If any thread, tips or somewhere in the Python SDK Documentation I miss,  **any ideas, that will be appreciative guys. 🙂

On 15/11/2016 at 18:49, xxxxxxxx wrote:

Heya,

I'm not sure if it's in the Python docs or not, but from the C++ documentation it's:

bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, "This button makes your dreams come true<br>And not the one where you're late for class and miss an important test")

On 15/11/2016 at 20:16, xxxxxxxx wrote:

Thanks Withers, 
That works 🙂 !

bc = c4d.BaseContainer()                            ######Create a new container to store the button image
helpInfo = "Thanks Whithers\nAnd You have a great and safe day."
bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, helpInfo) 
path = os.path.join(os.path.dirname(__file__), "res/UI_Icons", "UI_B1.png")  #The path to the image
bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
bc.SetFilename(GEN_BUTTON, path)  #Add this location info to the conatiner 
bc.SetLong(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_NONE) #Sets the border to look like a button
self.myBitButton=self.AddCustomGui(GEN_BUTTON, c4d.CUSTOMGUI_BITMAPBUTTON, "", c4d.BFH_CENTER | c4d.BFV_CENTER, 78, 0, bc)
self.myBitButton.SetImage(path, False)  #Add the image to the button

THANKS again,
Cheers,
AP Ashton