#๐Ÿ”’ (custom)tkinter widget sizing issues

31 messages ยท Page 1 of 1 (latest)

dawn crowBOT
#

@stone dove

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

sinful scaffold
#

so the issue is that the green label on the label stretches to be the same size as the frame on the right?

#

i see

#

the issue is probably not with the InfoBox class

#

i'd imagine the problem is with how the label and the infobox are placed on the root

#

can you send that part of the code

#

oh ok so both the frame and the label are inside the Editor class?

#

maybe try also setting the row 0 weight to 1

#

oh mb i didnt see it

#

mhm idk try self.grid_propagate(False)

#

In the editor class yeah

#

did anything change?

#

wait i thought thats what you wanted

#

so you want like the outer frame to always be the same size, but the labels inside to squeeze to fit inside?

#

yeah but i mean that's what the grid_propagate(False) inside the Editor class should be doing

#

can you try not setting the frame height to 0

#

lmao i've never seen this before

#

idk if this could be a customtk thing

#

but probably not

#

how are you putting the Editor widget in the root

#

and i guess that button on the left just has rowspan = 2?

#

wait can you just do Editor(self, fg_color=("white", "white"), relief="sunken", borderwidth=10) so we can see how far the editor frame is stretching

#

wdym

#

oh nice lets go

#

it just makes it so the rows and columns never change size

#

to accomodate for the contents

#

anyways at least its fixed lol

#

ggs

#

of course brother

dawn crowBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.