RhetTbull / guitk

Python GUI Toolkit for Tk (guitk): simplify the layout and construction of tkinter graphical user interfaces in python using a declarative syntax.
MIT License
17 stars 1 forks source link

weight_x, weight_y does not work for widgets with scrollbars #32

Closed RhetTbull closed 1 year ago

RhetTbull commented 1 year ago

I think the problem is that when the scrollbars are added, the widget is placed inside a frame and the grid_rowconfigure/columnconfigure isn't working on the right object.


Created Text widget 'OUTPUT .!toplevel.!frame.!frame.!text {'self': <guitk.tk_text.Text object at 0x100579f90>, 'parent': <tkinter.ttk.Frame object .!toplevel.!frame>, 'window': <__main__.HelloWorldWindow object at 0x100c07b10>, 'row': 0, 'col': 0, 'kwargs_text': {}, 'event': <guitk.events.Event object at 0x100c1e710>}```

When a widget is created with scrolled_widget_factory, the geometry code will need to get the parent of the parent of the widget, not the parent.  Perhaps a Widget class property that indicates whether the widget is created inside a frame.
RhetTbull commented 1 year ago

fixed in SwiftUI branch