if ( !ctrl )
return false;
- if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER )
+ if ( event.GetEventType() == wxEVT_TEXT_ENTER )
{
if ( propGrid->IsEditorsValueModified() )
{
return true;
}
}
- else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED )
+ else if ( event.GetEventType() == wxEVT_TEXT )
{
//
// Pass this event outside wxPropertyGrid so that,
tc->SetValue(correctText);
}
- tc->SetSelection(-1,-1);
+ tc->SelectAll();
}
void wxPGTextCtrlEditor::OnFocus( wxPGProperty* property,
if ( comValIndex >= 0 )
{
const wxPGCommonValue* cv = GetCommonValue(comValIndex);
- wxPGCellRenderer* renderer = cv->GetRenderer();
+ renderer = cv->GetRenderer();
r.width = rect.width;
renderer->Render( dc, r, this, p, m_selColumn, comValIndex, renderFlags );
return;
bool wxPGChoiceEditor::OnEvent( wxPropertyGrid* propGrid, wxPGProperty* property,
wxWindow* ctrl, wxEvent& event ) const
{
- if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
+ if ( event.GetEventType() == wxEVT_COMBOBOX )
{
wxPGComboBox* cb = (wxPGComboBox*)ctrl;
int index = cb->GetSelection();
}
Refresh();
- wxCommandEvent evt(wxEVT_COMMAND_CHECKBOX_CLICKED,GetParent()->GetId());
+ wxCommandEvent evt(wxEVT_CHECKBOX,GetParent()->GetId());
wxPropertyGrid* propGrid = (wxPropertyGrid*) GetParent();
wxASSERT( wxDynamicCast(propGrid, wxPropertyGrid) );
// If mouse cursor was on the item, toggle the value now.
if ( propGrid->GetInternalFlags() & wxPG_FL_ACTIVATION_BY_CLICK )
{
- wxPoint pt = cb->ScreenToClient(::wxGetMousePosition());
- if ( pt.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) )
+ wxPoint point = cb->ScreenToClient(::wxGetMousePosition());
+ if ( point.x <= (wxPG_XBEFORETEXT-2+cb->m_boxHeight) )
{
if ( cb->m_state & wxSCB_STATE_CHECKED )
cb->m_state &= ~wxSCB_STATE_CHECKED;
bool wxPGCheckBoxEditor::OnEvent( wxPropertyGrid* WXUNUSED(propGrid), wxPGProperty* WXUNUSED(property),
wxWindow* WXUNUSED(ctrl), wxEvent& event ) const
{
- if ( event.GetEventType() == wxEVT_COMMAND_CHECKBOX_CLICKED )
+ if ( event.GetEventType() == wxEVT_CHECKBOX )
{
return true;
}