Sets the size of the page and shows. The sizing logic adjusts for some minor sizing errors (scrollbars going beyond bounds) resize_only if we are not interested in showing the page, only setting the size @todo: is resize_only still needed? Was in
(self, resize_only=False)
| 275 | self._pages[src], self._pages[dst] = self._pages[dst], self._pages[src] |
| 276 | |
| 277 | def ShowActive(self, resize_only=False): |
| 278 | """ |
| 279 | Sets the size of the page and shows. The sizing logic adjusts for some |
| 280 | minor sizing errors (scrollbars going beyond bounds) |
| 281 | |
| 282 | resize_only |
| 283 | if we are not interested in showing the page, only setting the size |
| 284 | |
| 285 | @todo: is resize_only still needed? Was introduced with 8b8b97 in mid |
| 286 | 2011 to fix a resizing bug with blank _pages, cannot reproduce |
| 287 | 13Sept2014 |
| 288 | """ |
| 289 | |
| 290 | ww, wh = self.page_container.GetSize() |
| 291 | bx, by = self.GetBorders() |
| 292 | ww -= bx * 4 |
| 293 | wh -= by * 4 |
| 294 | self._active_page.SetSize((max(ww, -1), max(wh, -1))) |
| 295 | self._active_page.SetPosition((0, 0)) |
| 296 | |
| 297 | if not resize_only: |
| 298 | self._active_page.Show() |
| 299 | |
| 300 | self.Layout() |
| 301 | |
| 302 | def IsActive(self, page): |
| 303 | return self._active_page == page |
no test coverage detected