Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Tooltips for custom GUI button [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 359 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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  
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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 using RegisterCommandPlugin()[URL-REMOVED].

        Best wishes,
        Sebastian


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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 the SDK download[URL-REMOVED].

            best wishes,
            Sebastian


            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post