OCR Project.py
def Treeview_OCR_Select_Row(self, event):
		'''
		Function activate when double click an entry from Treeview
		'''
		self.Focused_Item = self.Treeview.focus()
		child = self.Treeview.item(self.Focused_Item)
		self.Btn_Update_Area.configure(state=NORMAL)

		
		if self.Region_Type.get() == 1:
			x = 0
		else:
			x = 4	
		self.Str_CenterX.delete("1.0", END)
		try:
			self.Str_CenterX.insert("end", child["values"][x])
		except:
			self.Str_CenterX.insert("end", 0)
			
		self.Str_CenterY.delete("1.0", END)
		try:
			self.Str_CenterY.insert("end", child["values"][x+1])
		except:
			self.Str_CenterY.insert("end", 0)

		self.Str_Weight.delete("1.0", END)
		try:
			self.Str_Weight.insert("end", child["values"][x+2])
		except:
			self.Str_Weight.insert("end", 0)

		self.Str_Height.delete("1.0", END)
		try:
			self.Str_Height.insert("end", child["values"][x+3])
		except:
			self.Str_Height.insert("end", 0)

		Function activate when double click an entry from Treeview
		
Function activate when double click an entry from Treeview
Function activate when double click an entry from Treeview
def Treeview_OCR_Select_Row(self, event):
		self.Focused_Item = self.Treeview.focus()
		child = self.Treeview.item(self.Focused_Item)
		self.Btn_Update_Area.configure(state=NORMAL)
		if self.Region_Type.get() == 1:
			x = 0
		else:
			x = 4	
		self.Str_CenterX.delete("1.0", END)
		try:
			self.Str_CenterX.insert("end", child["values"][x])
		except:
			self.Str_CenterX.insert("end", 0)
		self.Str_CenterY.delete("1.0", END)
		try:
			self.Str_CenterY.insert("end", child["values"][x+1])
		except:
			self.Str_CenterY.insert("end", 0)
		self.Str_Weight.delete("1.0", END)
		try:
			self.Str_Weight.insert("end", child["values"][x+2])
		except:
			self.Str_Weight.insert("end", 0)
		self.Str_Height.delete("1.0", END)
		try:
			self.Str_Height.insert("end", child["values"][x+3])
		except:
			self.Str_Height.insert("end", 0)
def Treeview_OCR_Select_Row ( self , event ) : self . Focused_Item = self . Treeview . focus ( ) child = self . Treeview . item ( self . Focused_Item ) self . Btn_Update_Area . configure ( state = NORMAL ) if self . Region_Type . get ( ) == 1 : x = 0 else : x = 4 self . Str_CenterX . delete ( "1.0" , END ) try : self . Str_CenterX . insert ( "end" , child [ "values" ] [ x ] ) except : self . Str_CenterX . insert ( "end" , 0 ) self . Str_CenterY . delete ( "1.0" , END ) try : self . Str_CenterY . insert ( "end" , child [ "values" ] [ x + 1 ] ) except : self . Str_CenterY . insert ( "end" , 0 ) self . Str_Weight . delete ( "1.0" , END ) try : self . Str_Weight . insert ( "end" , child [ "values" ] [ x + 2 ] ) except : self . Str_Weight . insert ( "end" , 0 ) self . Str_Height . delete ( "1.0" , END ) try : self . Str_Height . insert ( "end" , child [ "values" ] [ x + 3 ] ) except : self . Str_Height . insert ( "end" , 0 )
Function activate when double click an entry from Treeview
Function activate when double click an entry from Treeview
'''
		Function activate when double click an entry from Treeview
		'''
self
event