Changeset 225
- Timestamp:
- 05/25/08 00:12:56 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
packages/vanilla/trunk/Lib/vanilla/vanillaTextBox.py
r206 r225 41 41 | Mini | H | 11 | 42 42 43 *text* The text to be displayed in the text box. 43 *text* The text to be displayed in the text box. If the object is a NSAttributedString, the attributes will be used for display. 44 44 45 45 *alignment* A string representing the desired visual alignment of the text in the text box. The options are: … … 61 61 self._setupView(self.nsTextFieldClass, posSize) 62 62 self._setSizeStyle(sizeStyle) 63 self._nsObject.setStringValue_(text) 63 if isinstance(text, NSAttributedString): 64 self._nsObject.setAttributedStringValue_(text) 65 else: 66 self._nsObject.setStringValue_(text) 64 67 self._nsObject.setDrawsBackground_(False) 65 68 self._nsObject.setBezeled_(False) … … 86 89 *value* A string representing the contents of the text box. 87 90 """ 88 self._nsObject.setStringValue_(value) 91 if isinstance(value, NSAttributedString): 92 self._nsObject.setAttributedStringValue_(value) 93 else: 94 self._nsObject.setStringValue_(value)
