Changeset f4b37d1 in sasview for sansguiframe
- Timestamp:
- Sep 23, 2011 1:03:54 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- e6c6b67
- Parents:
- a582d28
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
rd03a356 rf4b37d1 62 62 return col_dict 63 63 64 65 66 class SPanel(ScrolledPanel): 67 def __init__(self, parent, *args, **kwds): 68 ScrolledPanel.__init__(self, parent , *args, **kwds) 69 self.SetupScrolling() 70 64 71 class GridPage(sheet.CSheet): 65 72 """ … … 69 76 """ 70 77 sheet.CSheet.__init__(self, parent) 71 self.SetLabelBackgroundColour('#DBD4D4') 72 self.AutoSize() 78 79 self.AdjustScrollbars() 80 #self.SetLabelBackgroundColour('#DBD4D4') 81 self.parent = parent 73 82 self.panel = panel 74 83 self.col_names = [] … … 89 98 self.SetNumberRows(self._cols) 90 99 self.SetNumberCols(self._rows) 100 self.AutoSize() 91 101 self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 92 102 self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) … … 286 296 if cell_row > self.max_row_touse: 287 297 self.max_row_touse = cell_row 288 self.AutoSize() 289 298 290 299 291 300 class Notebook(nb, PanelBase): … … 301 310 """ 302 311 nb.__init__(self, parent, -1, 303 style= wx.aui.AUI_BUTTON_DOWN|304 wx.aui.AUI_ NB_WINDOWLIST_BUTTON|312 style=wx.aui.AUI_NB_WINDOWLIST_BUTTON| 313 wx.aui.AUI_BUTTON_DOWN| 305 314 wx.aui.AUI_NB_DEFAULT_STYLE| 306 315 wx.CLIP_CHILDREN) … … 324 333 self.SetPageText(pos, title) 325 334 self.SetSelection(pos) 326 return grid 335 return grid , pos 327 336 328 337 def enable_close_button(self): … … 448 457 if data_outputs is None or data_outputs == {}: 449 458 return 450 grid = self.add_empty_page() 451 #grid = GridPage(self, panel=self.parent) 452 grid.set_data(data_inputs, data_outputs) 453 #self.AddPage(grid, "", True) 454 #pos = self.GetPageIndex(grid) 455 #title = "Batch " + str(self.GetPageCount()) 456 #self.SetPageText(pos, title) 457 #self.SetSelection(pos) 458 459 460 for pos in range(self.GetPageCount()): 461 grid = self.GetPage(pos) 462 if grid.data is None: 463 #Found empty page 464 grid.set_data(data_inputs, data_outputs) 465 self.SetSelection(pos) 466 return 467 468 grid, pos = self.add_empty_page() 469 grid.set_data(data_inputs, data_outputs) 470 459 471 def add_column(self): 460 472 """ … … 474 486 for cpos in cols_pos: 475 487 grid.DeleteCols(cpos) 476 477 478 class SPanel(ScrolledPanel): 479 def __init__(self, parent, *args, **kwds): 480 ScrolledPanel.__init__(self, parent , *args, **kwds) 481 self.SetupScrolling() 488 482 489 483 490 … … 486 493 data_outputs=None, *args, **kwds): 487 494 SPanel.__init__(self, parent , *args, **kwds) 495 488 496 self.vbox = wx.BoxSizer(wx.VERTICAL) 489 497
Note: See TracChangeset
for help on using the changeset viewer.