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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Add Help Info to a UI Custom Button ?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 308 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 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. 🙂

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

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

          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

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