fixed setfocus() flicker in listctrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder 1999-11-24 15:11:29 +00:00
parent 0d0512bd8f
commit c0d6c58bd0
4 changed files with 12 additions and 4 deletions

View File

@ -607,7 +607,12 @@ class WXDLLEXPORT wxListCtrl: public wxControl
bool DoPopupMenu( wxMenu *menu, int x, int y )
{ return m_mainWin->PopupMenu( menu, x, y ); }
void SetFocus()
{ m_mainWin->SetFocus(); }
{
/* The test in window.cpp fails as we are a composite
window, so it checks against "this", but not m_mainWin. */
if(FindFocus() != this)
m_mainWin->SetFocus();
}
// implementation

View File

@ -45,7 +45,6 @@ class WXDLLEXPORT wxMenu;
class WXDLLEXPORT wxMenuItemBase : public wxObject
{
public:
wxMenuItemBase() { }
// creation
static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL,
@ -118,6 +117,10 @@ protected:
bool m_isCheckable; // can be checked?
bool m_isChecked; // is checked?
bool m_isEnabled; // is enabled?
// some compilers need a default constructor here, do not use
wxMenuItemBase()
{ }
};
// ----------------------------------------------------------------------------

View File

@ -2475,7 +2475,7 @@ void wxWindow::GetTextExtent( const wxString& string,
void wxWindow::SetFocus()
{
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (m_wxwindow)
{
if (!GTK_WIDGET_HAS_FOCUS (m_wxwindow))

View File

@ -2475,7 +2475,7 @@ void wxWindow::GetTextExtent( const wxString& string,
void wxWindow::SetFocus()
{
wxCHECK_RET( (m_widget != NULL), wxT("invalid window") );
if (m_wxwindow)
{
if (!GTK_WIDGET_HAS_FOCUS (m_wxwindow))