mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Use text object's new settext() method.
This commit is contained in:
		
							parent
							
								
									7912b008cf
								
							
						
					
					
						commit
						a82a27585a
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		|  | @ -14,6 +14,9 @@ def create(self, (parent, (cols, rows))): | |||
| 		self.editor = 0 | ||||
| 		return self | ||||
| 	# | ||||
| 	def settext(self, text): | ||||
| 		self.editor.settext(text) | ||||
| 	# | ||||
| 	# Downcalls from parent to child | ||||
| 	# | ||||
| 	def destroy(self): | ||||
|  | @ -35,7 +38,7 @@ def getbounds(self, bounds): | |||
| 	def realize(self): | ||||
| 		self.window = self.parent.getwindow() | ||||
| 		self.editor = self.window.textcreate(self.bounds) | ||||
| 		self.editor.replace(self.text) | ||||
| 		self.editor.settext(self.text) | ||||
| 		self.parent.need_mouse(self) | ||||
| 		self.parent.need_keybd(self) | ||||
| 		self.parent.need_altdraw(self) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum