Changeset 3156
- Timestamp:
- 06/05/07 13:55:34 (2 years ago)
- Files:
-
- trunk/dabo/dObject.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dPemMixin.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/dObject.py
r3155 r3156 94 94 # No name; use module.classname 95 95 nm = "%s.%s" % (self.__class__.__module__, self.__class__.__name__) 96 try: 97 _id = self.GetId() 98 except: 99 _id = "?" 96 _id = self._getID() 100 97 return "<%(nm)s (baseclass %(classname)s, id:%(_id)s)>" % locals() 101 98 99 100 def _getID(self): 101 """Defaults to the Python id() function. Objects in sub-modules, such as the various 102 UI toolkits, can override to substitute something more relevant to them. 103 """ 104 return id(self) 102 105 103 106 trunk/dabo/ui/uiwx/dPemMixin.py
r3104 r3156 680 680 681 681 682 def _getID(self): 683 """Override the default behavior to return the wxPython ID.""" 684 return self.GetId() 685 686 682 687 def fitToSizer(self, extraWidth=0, extraHeight=0): 683 688 """Resize the control to fit the size required by its sizer.""" … … 761 766 paged controls to switch to the page that contains this object. 762 767 """ 768 try: 769 frm = self.Form 770 except: 771 frm = None 763 772 cntnr = self 773 iswiz = isinstance(frm, dabo.ui.dialogs.Wizard) 774 mtch = {True: dabo.ui.dialogs.WizardPage, False: dabo.ui.dPage}[iswiz] 764 775 while cntnr and not isinstance(cntnr, dabo.ui.dForm): 765 if isinstance(cntnr, dabo.ui.dPage): 766 cntnr.Parent.SelectedPage = cntnr 776 if isinstance(cntnr, mtch): 777 if iswiz: 778 frm.CurrentPage = cntnr 779 else: 780 cntnr.Parent.SelectedPage = cntnr 767 781 cntnr = cntnr.Parent 768 782 … … 1355 1369 redraw() hook method. 1356 1370 """ 1371 # Clear the idle flag. 1372 self._needRedraw = False 1357 1373 if dc is None: 1358 1374 # First, clear any old drawing if requested … … 1365 1381 # Call the hook 1366 1382 self.redraw(dc) 1367 # Clear the idle flag.1368 self._needRedraw = False1369 1383 #- if self.Application.Platform == "Win": 1370 1384 #- print "REFRESH", time.time() … … 1472 1486 """ 1473 1487 return None 1488 1474 1489 1475 1490 def _jiggleFontSize(self): … … 1479 1494 self.FontSize -= 1 1480 1495 self.Thaw() 1496 1481 1497 1482 1498 def _onFontPropsChanged(self, evt):
