#pragma implementation "textctrl.h"
#endif
+#include "wx/defs.h"
+
+#if wxUSE_TEXTCTRL
+
#ifdef __DARWIN__
#include <sys/types.h>
#include <sys/stat.h>
for (int j = i; j < actualsize; j++)
{
- tmp += wxBuffer[j];
-
if (wxBuffer[j] == '\r')
return tmp;
+
+ tmp += wxBuffer[j];
}
return tmp;
}
if ( panel && panel->GetDefaultItem() )
{
- wxButton *def = panel->GetDefaultItem() ;
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
- event.SetEventObject(def);
- def->Command(event);
- event.Skip() ;
- return ;
+ wxButton *def = wxDynamicCast(panel->GetDefaultItem(),
+ wxButton);
+ if ( def && def->IsEnabled() )
+ {
+ wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
+ event.SetEventObject(def);
+ def->Command(event);
+ return ;
+ }
}
}
//else: multiline controls need Enter for themselves
event.Enable( CanRedo() );
}
+#endif
+ // wxUSE_TEXTCTRL