else
s = property->GetDisplayedString();
- tc->SetValue(s);
-}
+ tc->SetValue(s);
+
+ // Update font boldness
+ wxPropertyGrid* pg = property->GetGrid();
+ if ( pg->HasFlag(wxPG_BOLD_MODIFIED) )
+ {
+ if ( property->HasFlag(wxPG_PROP_MODIFIED) )
+ tc->SetFont(pg->GetCaptionFont());
+ else
+ tc->SetFont(pg->GetFont());
+#if defined(__WXMSW__) && !defined(__WXWINCE__)
+ ::SendMessage(GetHwndOf(tc), EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0, 0));
+#endif
+ }
+}
// Provided so that, for example, ComboBox editor can use the same code
// (multiple inheritance would get way too messy).
if ( flags & wxODCB_PAINTING_CONTROL )
renderFlags |= wxPGCellRenderer::Control;
+ else
+ renderFlags |= wxPGCellRenderer::ChoicePopup;
if ( flags & wxODCB_PAINTING_SELECTED )
renderFlags |= wxPGCellRenderer::Selected;
else
cb->SetSelection( -1 );
- // Connect event handling
- wxWindowID id = cb->GetId();
- propGrid->Connect(id, wxEVT_COMMAND_COMBOBOX_SELECTED,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
- propGrid->Connect(id, wxEVT_COMMAND_TEXT_UPDATED,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
- propGrid->Connect(id, wxEVT_COMMAND_TEXT_ENTER,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
-
#ifdef __WXMSW__
cb->Show();
#endif
wxPropertyGrid* propGrid = (wxPropertyGrid*) GetParent()->GetParent();
wxASSERT( propGrid->IsKindOf(CLASSINFO(wxPropertyGrid)) );
- propGrid->OnCustomEditorEvent(evt);
+ propGrid->HandleCustomEditorEvent(evt);
}
cb->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
- cb->Connect( wxPG_SUBID1, wxEVT_LEFT_DOWN,
- (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
- &wxPropertyGrid::OnCustomEditorEvent, NULL, propGrid );
-
- cb->Connect( wxPG_SUBID1, wxEVT_LEFT_DCLICK,
- (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
- &wxPropertyGrid::OnCustomEditorEvent, NULL, propGrid );
-
if ( property->GetChoiceSelection() > 0 &&
!property->IsValueUnspecified() )
cb->m_state = 1;
void wxPropertyGrid::CorrectEditorWidgetPosY()
{
+ if ( m_selColumn == -1 )
+ return;
+
if ( m_selected && (m_wndEditor || m_wndEditor2) )
{
wxRect r = GetEditorWidgetRect(m_selected, m_selColumn);
if ( maxLen > 0 )
tc->SetMaxLength( maxLen );
- // Connect event handling
- id = ed->GetId();
- this->Connect(id, wxEVT_COMMAND_TEXT_UPDATED,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
- this->Connect(id, wxEVT_COMMAND_TEXT_ENTER,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
-
return (wxWindow*) ed;
}
if ( selected->HasFlag(wxPG_PROP_READONLY) )
but->Disable();
- // Connect event handling
- id = but->GetId();
- this->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
-
return but;
}
SetBackgroundColour(pg->GetCellBackgroundColour());
}
-void wxPGMultiButton::Finalize( wxPropertyGrid* propGrid, const wxPoint& pos )
+void wxPGMultiButton::Finalize( wxPropertyGrid* WXUNUSED(propGrid),
+ const wxPoint& pos )
{
Move( pos.x + m_fullEditorSize.x - m_buttonsWidth, pos.y );
-
- // Connect event handling
- for ( unsigned int i=0; i<GetCount(); i++ )
- {
- wxWindowID id = GetButtonId(i);
- propGrid->Connect(id, wxEVT_COMMAND_BUTTON_CLICKED,
- wxEventHandler(wxPropertyGrid::OnCustomEditorEvent));
- }
}
int wxPGMultiButton::GenId( int id ) const