Open Yunjonue opened 1 year ago
Could you share the part of dev?
searchbar = CTkEntry(window, placeholder_text='Keywords separated by spaces or commas', font=('Consolas', 16), justify='center') searchbar.grid(row=2, column=0, columnspan=8, padx=(2, 2), pady=(2, 1), sticky='we')
switch = CTkSwitch(window, text='CTkSwitch', font=('Consolas', 16), variable=var, onvalue=False, offvalue=True) switch.grid(row=2, column=7, columnspan=1, padx=(1, 2), pady=(2, 1), sticky='we')
searchbutton = CTkButton(window, textvariable=searchlabel, font=('Consolas', 16), command=search) searchbutton.grid(row=2, column=8, columnspan=2, padx=(1, 2), pady=(2, 1), sticky='we')
maybe dat weight :
could you set the column grid and width widget ? switch.grid_columnconfigure((0,1,2),weight=0)
You can try lowering the init width in the switch module
You can try lowering the init width in the switch module
It's not recommended to alter a module's code locally.
@Yunjonue - If you don't like how the CTkSwitch
widget has too much empty space in your project, then you can alter the width with the width
attribute.
If you think that this is too much empty space for CustomTkinter in general, you can submit a PR changing this.
maybe dat weight :
could you set the column grid and width widget ? switch.grid_columnconfigure((0,1,2),weight=0)
You don't want to change the weight of the column or row because that can have unintended side effects (like thw widget filling up too much space, other widgets being misaligned, etc.). Instead, you want to change the width of the widget itself.