jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

Error configuring: unknown option "-ipadx" #536

Closed cristianmarian95 closed 4 years ago

cristianmarian95 commented 6 years ago

Bug Report

when i try to add inpadding to a label frame i get this error:

Error configuring: unknown option "-ipadx"

Code here:

self.app.setLabelFrameInPadding(self.name("_content"), [20, 20])
jarvisteach commented 5 years ago

hi @cristianmarian95 - padding in containers works a bit differently to regular widgets (there's a bit of an issue here in general). But, to set some padding, inside the label frame, you can just set the padding:

from appJar import gui 

with gui('labelframes', bg='purple') as app:
    app.label('hello world')
    with app.labelFrame('main frame', bg='yellow'):
        app.label('top', bg='red')
        app.label('bottom', bg='green')

    with app.labelFrame('2nd frame', bg='pink'):
        app.label('top again', bg='red')
        app.label('bottom again', bg='green')

    app.setLabelFramePadding('2nd frame', [20,20])