Tooltips for custom GUI button [SOLVED]
-
On 25/11/2014 at 02:09, xxxxxxxx wrote:
Hi,
I have a custom GUI button with tooltip in my plugin. I want some part of the tooltip to be in bold and the rest in normal font(similar to the buttons in the C4D panels like Cube, Freehand etc).
I am not sure how to make the tooltip bold. Any help would be appreciated. I am using the below code:def CreateLayout(self) : self.SetTitle("My Python Dialog") self.GroupBegin(0, c4d.BFH_SCALEFIT|c4d.BFH_SCALEFIT, 3, 4, "Bitmap Example",0) bc = c4d.BaseContainer() ######Create a new container to store the button image bc.SetInt32(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_OUT) #Sets the border to look like a button bc.SetInt32(c4d.BITMAPBUTTON_ICONID1, c4d.RESOURCEIMAGE_MOVE) #####Sets Button Icon bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, "I am a tool tip") bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True) self.myBitButton=self.AddCustomGui(MY_BITMAP_BUTTON, c4d.CUSTOMGUI_BITMAPBUTTON, "My Button", c4d.BFH_CENTER | c4d.BFV_CENTER, 50, 20, bc) self.GroupEnd() return True
-
On 26/11/2014 at 00:47, xxxxxxxx wrote:
Hello and welcome,
actually you can use the <b> and <br> HTML tags to format the bubble help text:
bc.SetString(c4d.BITMAPBUTTON_TOOLTIP,"Headline<br>Tooltip")
You don't have to do this when you create a
CommandData
[URL-REMOVED] plugin as Cinema will handle the name and help defined when usingRegisterCommandPlugin()
[URL-REMOVED].Best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 26/11/2014 at 20:53, xxxxxxxx wrote:
Hi Sebastian,
Thanks a lot !! This works perfectly.
Quick question - In the Python SDK Documentation, we do not find these details mentioned. Is there any other link where we can find more examples?Regards.
-
On 27/11/2014 at 00:23, xxxxxxxx wrote:
Hello,
do you mean example code? You find
example scripts, scenes and plugins online
[URL-REMOVED] or in theSDK download
[URL-REMOVED].best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.