Changeset 37c36d9 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- Timestamp:
- Sep 3, 2011 5:17:11 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:
- 53cf669
- Parents:
- dc51a7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
rd9c5777 r37c36d9 2351 2351 self.cpanel_on_focus.on_reset(event) 2352 2352 2353 def on_change_caption(self, name, old_caption, new_caption): 2354 """ 2355 Change the panel caption 2356 2357 :param name: window_name of the pane 2358 :param old_caption: current caption [string] 2359 :param new_caption: new caption [string] 2360 """ 2361 # wx.aui.AuiPaneInfo 2362 pane_info = self.get_paneinfo(name) 2363 # New Caption 2364 pane_info.Caption(new_caption) 2365 # update the data_panel.cb_plotpanel 2366 if 'data_panel' in self.panels.keys(): 2367 # remove from data_panel combobox 2368 data_panel = self.panels["data_panel"] 2369 if data_panel.cb_plotpanel is not None: 2370 pos = data_panel.cb_plotpanel.FindString(str(old_caption)) 2371 if pos != wx.NOT_FOUND: 2372 data_panel.cb_plotpanel.SetString(pos, new_caption) 2373 data_panel.cb_plotpanel.SetStringSelection(new_caption) 2374 # update window Show menu 2375 if self._window_menu != None: 2376 for item in self._window_menu.GetMenuItems(): 2377 pos = self._window_menu.FindItem(old_caption) 2378 if self._window_menu.GetLabel(pos) == str(old_caption): 2379 self._window_menu.SetLabel(pos, new_caption) 2380 break 2381 # update aui manager 2382 self._mgr.Update() 2383 2384 def get_paneinfo(self, name): 2385 """ 2386 Get pane Caption from window_name 2387 2388 :param name: window_name in AuiPaneInfo 2389 : return: AuiPaneInfo of the name 2390 """ 2391 return self._mgr.GetPane(name) 2392 2353 2393 def enable_undo(self): 2354 2394 """ … … 2507 2547 except: 2508 2548 pass 2509 #print self.callback,self.schedule,self.schedule_full_draw_list2510 2549 2511 2550 # Draw all panels
Note: See TracChangeset
for help on using the changeset viewer.