3014 dialog = wx.TextEntryDialog(self.ParentWindow, |
3014 dialog = wx.TextEntryDialog(self.ParentWindow, |
3015 _("Edit comment"), |
3015 _("Edit comment"), |
3016 _("Please enter comment text"), |
3016 _("Please enter comment text"), |
3017 comment.GetContent(), |
3017 comment.GetContent(), |
3018 wx.OK|wx.CANCEL|wx.TE_MULTILINE) |
3018 wx.OK|wx.CANCEL|wx.TE_MULTILINE) |
3019 dialog.SetClientSize(wx.Size(400, 200)) |
3019 width, height = comment.GetSize() |
|
3020 dialogSize = wx.Size(max(width + 30, 400), max(height + 60, 200)) |
|
3021 dialog.SetClientSize(dialogSize) |
3020 if dialog.ShowModal() == wx.ID_OK: |
3022 if dialog.ShowModal() == wx.ID_OK: |
3021 value = dialog.GetValue() |
3023 value = dialog.GetValue() |
3022 rect = comment.GetRedrawRect(1, 1) |
3024 rect = comment.GetRedrawRect(1, 1) |
3023 comment.SetContent(value) |
3025 comment.SetContent(value) |
3024 comment.SetSize(*self.GetScaledSize(*comment.GetSize())) |
3026 comment.SetSize(*self.GetScaledSize(*comment.GetSize())) |