Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior Changes will not be visible in your window until you call window.read or window.refresh. If you change visibility, your element may MOVE. If you want it to remain statio
(self, visible=None)
| 8364 | return element |
| 8365 | |
| 8366 | def update(self, visible=None): |
| 8367 | """ |
| 8368 | Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior |
| 8369 | |
| 8370 | Changes will not be visible in your window until you call window.read or window.refresh. |
| 8371 | |
| 8372 | If you change visibility, your element may MOVE. If you want it to remain stationary, use the "layout helper" |
| 8373 | function "pin" to ensure your element is "pinned" to that location in your layout so that it returns there |
| 8374 | when made visible. |
| 8375 | |
| 8376 | :param visible: control visibility of element |
| 8377 | :type visible: (bool) |
| 8378 | """ |
| 8379 | if not self._widget_was_created(): # if widget hasn't been created yet, then don't allow |
| 8380 | return |
| 8381 | |
| 8382 | if self._this_elements_window_closed(): |
| 8383 | _error_popup_with_traceback('Error in Column.update - The window was closed') |
| 8384 | return |
| 8385 | |
| 8386 | if self.expand_x and self.expand_y: |
| 8387 | expand = tk.BOTH |
| 8388 | elif self.expand_x: |
| 8389 | expand = tk.X |
| 8390 | elif self.expand_y: |
| 8391 | expand = tk.Y |
| 8392 | else: |
| 8393 | expand = None |
| 8394 | |
| 8395 | if visible is False: |
| 8396 | if self.TKColFrame: |
| 8397 | self._pack_forget_save_settings() |
| 8398 | # self.TKColFrame.pack_forget() |
| 8399 | if self.ParentPanedWindow: |
| 8400 | self.ParentPanedWindow.remove(self.TKColFrame) |
| 8401 | elif visible is True: |
| 8402 | if self.TKColFrame: |
| 8403 | self._pack_restore_settings() |
| 8404 | # self.TKColFrame.pack(padx=self.pad_used[0], pady=self.pad_used[1], fill=expand) |
| 8405 | if self.ParentPanedWindow: |
| 8406 | self.ParentPanedWindow.add(self.TKColFrame) |
| 8407 | if visible is not None: |
| 8408 | self._visible = visible |
| 8409 | |
| 8410 | def contents_changed(self): |
| 8411 | """ |
nothing calls this directly
no test coverage detected