equal
deleted
inserted
replaced
135 @return: wx.Size(tool_tip_width, tool_tip_height) |
135 @return: wx.Size(tool_tip_width, tool_tip_height) |
136 """ |
136 """ |
137 max_width = max_height = 0 |
137 max_width = max_height = 0 |
138 |
138 |
139 # Create a memory DC for calculating text extent |
139 # Create a memory DC for calculating text extent |
140 dc = wx.MemoryDC() |
140 dc = wx.MemoryDC(wx.EmptyBitmap(1, 1)) |
141 dc.SetFont(self.Font) |
141 dc.SetFont(self.Font) |
142 |
142 |
143 # Compute max tip text size |
143 # Compute max tip text size |
144 for line in self.Tip: |
144 for line in self.Tip: |
145 w, h = dc.GetTextExtent(line) |
145 w, h = dc.GetTextExtent(line) |