def METHOD_NAME(self, event):
    with TextEntryValidatedDialog(
        self, self.validator, "Enter a new name for your {}:".format(self.entityName),
        "Rename {}".format(self.entityName)
    ) as dlg:
        active = self.getActiveEntity()
        dlg.SetValue(active.name)
        dlg.txtctrl.SetInsertionPointEnd()
        dlg.CenterOnParent()
        if dlg.ShowModal() == wx.ID_OK:
            self.DoRename(active, dlg.txtctrl.GetValue().strip())
            self.refreshEntityList(active)
            wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED))