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

    Button minimum size

    Scheduled Pinned Locked Moved PYTHON Development
    3 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 19/04/2017 at 08:41, xxxxxxxx wrote:

      Hello I would like to have 2 buttons on top of each other with a character in their.
      And the group who contain thoses two button must be less than 14px height. I tried a group but that didn't work. Even without any char buttons can't be into 14px.

      Is there any workaround? Thanks in advance

      import c4d
        
      class mainDialog(c4d.gui.GeDialog) :
              
          def CreateLayout(self) :
              if self.GroupBegin(1001, c4d.BFH_SCALEFIT, 2, 0 , "", 0) :            
                  #inith is not take in cosideration
                  if self.GroupBegin(1002, c4d.BFH_SCALEFIT | c4d.BFV_TOP, 1, 2 , "", inith=10) :
                      self.AddButton(1003, c4d.BFH_CENTER | c4d.BFV_CENTER, name="▲", inith=4)
                      self.AddButton(1004, c4d.BFH_CENTER | c4d.BFV_CENTER, name="▼", inith=4)
                  self.GroupEnd()
                  
                  self.AddStaticText(1005, c4d.BFH_CENTER | c4d.BFV_TOP, name="Normally should be aligned with both buttons")
                  
              self.GroupEnd()
        
              return True
              
        
      def main() :
          main_dlg = mainDialog()
          main_dlg.Open(dlgtype=c4d.DLG_TYPE_MODAL, defaultw=300, defaulth=150, xpos=-1, ypos=-1)
        
      if __name__=='__main__':
          main()
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 20/04/2017 at 06:19, xxxxxxxx wrote:

        Hi,

        I don't think, you will get a button to reduce below font size. Sorry. But couldn't you use a BitmapButtonCustomGui instead?

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

          On 20/04/2017 at 07:06, xxxxxxxx wrote:

          Ok thanks for confirming what I thinked about button size and font size ! 🙂
          But I guess it should be written somewhere button can't be smaller than font size even if the button is empty. Or maybe there is a way for set the font size inside the button.

          And yes I could go to BitmapButtonCustomGui but since it's use more ressource than a simple character and a button, I prefered ask before.

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