Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Login

    How to make static texts bold? Icons?

    Cinema 4D SDK
    2024 python
    2
    2
    383
    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.
    • M
      momoko
      last edited by

      Hi guys,

      1- I have a question. How can I make a static text bold? I tried some common methods in Python but they didn't work!

      self.AddStaticText(id=2001, flags=DEFAULT_TEXT_FLAGS, name=static_text)
      

      2- How can I add an icon to a button without using custom icons? Does Cinema4D provide any default icon like Blender?

      self.AddButton(id=3002, flags=c4d.BFH_SCALEFIT, initw=100, name="Button!")
      
      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @momoko
        last edited by ferdinand

        Hello @momoko,

        Thank you for reaching out to us. I understand that especially when getting familiar with a new API that the thirst for knowledge is immeasurable and the questions are uncountable but I must also point out our Support Guidelines here, especially our Support Topic Rules. A support topic should be mono-thematic, i.e., usually have one question only. If you have multiple questions, please open multiple topics.

        Please also make sure that your questions are repeatable as outlined in the guidelines. Usually this means complete code. I can guess from the context in this case that you are talking about GeDialog but I might not be able to in a more complex case.

        How can I make a static text bold? I tried some common methods in Python but they didn't work!

        I am not sure what you mean with common methods in Python, but you can make a static text font bold by a bit counterintuitively setting its border style. There is no italic option and bold emphasis should be used only very selectively.

        self.AddStaticText(id=2001, flags=c4d.BFH_SCALEFIT, name="Hello World", borderstyle=c4d.BORDER_WITH_TITLE_BOLD)
        

        How can I add an icon to a button without using custom icons? Does Cinema4D provide any default icon like Blender?

        I am not 100% sure how this is meant. Buttons with icons and text are a bit atypical in Cinema 4D and usually only appear in palettes. The standard dialog button cannot have an icon. But you can use a CUSTOMGUI_BITMAPBUTTON, but they are not really meant to have a caption. You can find a Python example here.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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