Made call tips vanish when the text edit loses focus.

Originally committed to SVN as r788.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-13 23:34:04 +00:00
parent 40e113d368
commit a33692c852
2 changed files with 10 additions and 0 deletions

View File

@ -149,6 +149,7 @@ SubsTextEditCtrl::~SubsTextEditCtrl() {
// Control event table
BEGIN_EVENT_TABLE(SubsTextEditCtrl,wxScintilla)
EVT_MOUSE_EVENTS(SubsTextEditCtrl::OnMouseEvent)
EVT_KILL_FOCUS(SubsTextEditCtrl::OnLoseFocus)
EVT_MENU(EDIT_MENU_SPLIT_PRESERVE,SubsTextEditCtrl::OnSplitLinePreserve)
EVT_MENU(EDIT_MENU_SPLIT_ESTIMATE,SubsTextEditCtrl::OnSplitLineEstimate)
@ -165,6 +166,14 @@ BEGIN_EVENT_TABLE(SubsTextEditCtrl,wxScintilla)
END_EVENT_TABLE()
//////////////
// Lose focus
void SubsTextEditCtrl::OnLoseFocus(wxFocusEvent &event) {
CallTipCancel();
event.Skip();
}
//////////////
// Set styles
void SubsTextEditCtrl::SetStyles() {

View File

@ -87,6 +87,7 @@ private:
void OnUseThesaurusSuggestion(wxCommandEvent &event);
void OnSetDicLanguage(wxCommandEvent &event);
void OnSetThesLanguage(wxCommandEvent &event);
void OnLoseFocus(wxFocusEvent &event);
public:
SubsEditBox *control;