Changeset 9680906d in sasview for sansguiframe/src
- Timestamp:
- Aug 31, 2011 5:05:23 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:
- 857d00f
- Parents:
- c17760d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
r9c8f3ad r9680906d 133 133 self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.on_close_page) 134 134 135 135 136 def enable_close_button(self): 136 137 """ … … 150 151 style |= wx.aui.AUI_NB_CLOSE_ON_ACTIVE_TAB 151 152 self.SetWindowStyle(style) 152 153 154 def on_edit_axis(self): 155 """ 156 Return the select cell of a given selected column 157 """ 158 pos = self.GetSelection() 159 grid = self.GetPage(pos) 160 print "selected column",grid.GetSelectedCols(), grid.GetSelectionMode() 161 162 print "selected cell", grid.GetSelectedCells() 163 164 print "notebook on_edit_axis()" 165 153 166 def on_close_page(self, event): 154 167 """ … … 202 215 self.vbox = wx.BoxSizer(wx.VERTICAL) 203 216 204 self.plotting_sizer = wx.FlexGridSizer(3, 5, 10, 5)217 self.plotting_sizer = wx.FlexGridSizer(3, 7, 10, 5) 205 218 w, h = self.GetSize() 206 219 #self.panel_grid = SPanel(self, -1, size=(w, -1)) … … 266 279 self.grid = Notebook(parent=self) 267 280 self.grid.set_data(self._data) 268 #self.grid = Table(parent=self, data=self._data)269 #vbox = wx.BoxSizer(wx.HORIZONTAL)270 281 self.grid_sizer.Add(self.grid, 1, wx.EXPAND, 0) 271 #self.panel_grid.SetSizer(vbox)282 272 283 273 284 def layout_grid1(self): … … 285 296 """ 286 297 self.x_axis_label = wx.TextCtrl(self, -1) 287 288 298 self.y_axis_label = wx.TextCtrl(self, -1) 289 290 self.x_axis_value = wx.TextCtrl(self, -1) 291 self.y_axis_value = wx.TextCtrl(self, -1) 292 299 self.x_axis_value = wx.TextCtrl(self, -1, size=(200, -1)) 300 self.y_axis_value = wx.TextCtrl(self, -1, size=(200, -1)) 301 self.x_axis_add = wx.Button(self, -1, "Add") 302 self.x_axis_add.Bind(event=wx.EVT_BUTTON, handler=self.on_edit_axis, 303 id=self.x_axis_add.GetId()) 304 self.y_axis_add = wx.Button(self, -1, "Add") 305 self.y_axis_add.Bind(event=wx.EVT_BUTTON, handler=self.on_edit_axis, 306 id=self.y_axis_add.GetId()) 293 307 self.x_axis_unit = wx.TextCtrl(self, -1) 294 308 self.y_axis_unit = wx.TextCtrl(self, -1) 295 309 self.plot_button = wx.Button(self, -1, "Plot") 296 310 wx.EVT_BUTTON(self, self.plot_button.GetId(), self.on_plot) 297 self.plotting_sizer.AddMany([(wx.StaticText(self, -1, "x"), 1, wx.LEFT, 10), 298 (self.x_axis_label, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 299 (self.x_axis_value, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 300 (wx.StaticText(self, -1 , "unit"), 1, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE|wx.EXPAND, 0), 301 (self.x_axis_unit), 302 (wx.StaticText(self, -1, "y"), 1, wx.LEFT, 10), 303 (self.y_axis_label, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 304 (self.y_axis_value, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 305 (wx.StaticText(self, -1 , "unit"), 1, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE|wx.EXPAND, 0), 306 (self.y_axis_unit), 307 (-1, -1), 308 (-1, -1), 309 (-1, -1), 310 (self.plot_button, 1, wx.LEFT, 30)]) 311 self.plotting_sizer.AddMany([ 312 (wx.StaticText(self, -1, "x-axis label"), 1, wx.LEFT, 10), 313 (self.x_axis_label, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 314 (wx.StaticText(self, -1, "x-axis value"), 1, wx.LEFT, 10), 315 (self.x_axis_value, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 316 (self.x_axis_add, 1, wx.LEFT|wx.RIGHT, 0), 317 (wx.StaticText(self, -1 , "unit"), 1, wx.LEFT|wx.RIGHT, 0), 318 (self.x_axis_unit, 0, wx.LEFT, 0), 319 (wx.StaticText(self, -1, "y-axis label"), 1, wx.LEFT, 10), 320 (self.y_axis_label, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 321 (wx.StaticText(self, -1, "y-axis value"), 1, wx.LEFT, 10), 322 (self.y_axis_value, wx.TOP|wx.BOTTOM|wx.LEFT, 10), 323 (self.y_axis_add, 1, wx.LEFT|wx.RIGHT, 0), 324 (wx.StaticText(self, -1 , "unit"), 1, wx.LEFT|wx.RIGHT, 0), 325 (self.y_axis_unit, 0, wx.LEFT, 0), 326 (-1, -1), 327 (-1, -1), 328 (-1, -1), 329 (-1, -1), 330 (-1, -1), 331 (-1, -1), 332 (self.plot_button, 1, wx.LEFT, 0)]) 311 333 312 334 def on_edit_axis(self, event): 335 """ 336 Get the selected column on the visible grid and set values for axis 337 """ 338 self.grid.on_edit_axis() 339 340 def edit_axis_helper(self, tcrtl_label, tcrtl_value): 341 """ 342 """ 313 343 def add_column(self): 314 344 """ … … 325 355 326 356 class GridFrame(wx.Frame): 327 def __init__(self, parent=None, data=None, id=-1, title="Batch Results", size=( 500, 400)):357 def __init__(self, parent=None, data=None, id=-1, title="Batch Results", size=(700, 400)): 328 358 wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size) 329 359 self.parent = parent
Note: See TracChangeset
for help on using the changeset viewer.