Button minimum size



  • 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()
    


  • 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?



  • 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.


Log in to reply