1. added wxGTK::wxToolBar::SetToolShortHelp() and test for it in sample

2. fix a crash if SetSelection is called too early in wxTextCtrl
3. patch for mouse position in wxTreeCtrl events


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-11-24 17:07:12 +00:00
parent 38cfbffa15
commit a1f79c1e00
10 changed files with 70 additions and 12 deletions

View File

@@ -14,6 +14,7 @@
#include "wx/textctrl.h"
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/settings.h"
#include <sys/types.h>
@@ -646,6 +647,14 @@ void wxTextCtrl::SetSelection( long from, long to )
{
wxCHECK_RET( m_text != NULL, wxT("invalid text ctrl") );
if ( (m_windowStyle & wxTE_MULTILINE) &&
!GTK_TEXT(m_text)->line_start_cache )
{
// tell the programmer that it didn't work
wxLogDebug(_T("Can't call SetSelection() before realizing the control"));
return;
}
gtk_editable_select_region( GTK_EDITABLE(m_text), (gint)from, (gint)to );
}