Skip to content

Layout settings ignored when UI is run in Python #161

Answered by alejandroautalan
2briancox asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @2briancox thanks for trying pygubu.

Lets start with this:

I am getting a Python error: Failed to set property 'container' on class '<class 'pygubu.widgets.tkscrolledframe.TkScrolledFrame'>'. Error: can't modify -container option after widget is created

You have set (maybe accidentally) container = True in the frame. This is a special property used to embed an entire toplevel window inside a frame. If you set to empty or False the error will disappear.

I have created a custom UI that uses TkScrolledFrame and TkScrolledText and when I use Pygubu Designer to open it (F5) every widget behaves as I want upon resizing the window.

But when I open the UI in a Python script, the window …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@2briancox
Comment options

@alejandroautalan
Comment options

Answer selected by 2briancox
Comment options

You must be logged in to vote
1 reply
@alejandroautalan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants