File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def __init__(self, widget):
7
7
def set_bounds (self ):
8
8
# print("LAYOUT", self.widget, self.widget.layout)
9
9
self .widget ._impl .set_bounds (
10
- self .widget .layout .absolute_content_left , self .widget .layout .absolute_content_top ,
10
+ self .widget .layout .content_left , self .widget .layout .content_top ,
11
11
self .widget .layout .content_width , self .widget .layout .content_height
12
12
)
13
13
for child in self .widget .children :
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def container(self, container):
29
29
self .native .BringToFront ()
30
30
31
31
for child in self .interface .children :
32
- child ._impl .container = container
32
+ child ._impl .container = self
33
33
34
34
self .rehint ()
35
35
Original file line number Diff line number Diff line change @@ -90,15 +90,16 @@ def set_content(self, widget):
90
90
self .native .Controls .Add (self .toolbar_native )
91
91
# Create the lookup table of menu items,
92
92
# then force the creation of the menus.
93
- self .native .Controls .Add (widget .native )
94
93
95
94
# Set the widget's viewport to be based on the window's content.
96
95
widget .viewport = WinFormsViewport (native = self .native , frame = self )
97
96
widget .frame = self
98
97
99
- # Add all children to the content widget.
100
- for child in widget .interface .children :
101
- child ._impl .container = widget
98
+ # Setting widget's container or parent
99
+ widget .container = self
100
+
101
+ # Expanding the widget to occupy empty space of window
102
+ widget .native .Dock = WinForms .DockStyle .Fill
102
103
103
104
def set_title (self , title ):
104
105
self .native .Text = title
You can’t perform that action at this time.
0 commit comments