// Author: Jaakko Salli
// Modified by:
// Created: 2005-05-14
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) Jaakko Salli
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#include "wx/intl.h"
#endif
-#include <wx/filename.h>
+#include "wx/filename.h"
-#include <wx/propgrid/propgrid.h>
+#include "wx/propgrid/propgrid.h"
#define wxPG_CUSTOM_IMAGE_WIDTH 20 // for wxColourProperty etc.
// Select correct editor control.
#if wxPG_INCLUDE_CHECKBOX
if ( !(m_flags & wxPG_PROP_USE_CHECKBOX) )
- return wxPG_EDITOR(Choice);
- return wxPG_EDITOR(CheckBox);
+ return wxPGEditor_Choice;
+ return wxPGEditor_CheckBox;
#else
- return wxPG_EDITOR(Choice);
+ return wxPGEditor_Choice;
#endif
}
wxDirProperty::wxDirProperty( const wxString& name, const wxString& label, const wxString& value )
: wxLongStringProperty(name,label,value)
{
- m_flags |= wxPG_NO_ESCAPE;
+ m_flags |= wxPG_PROP_NO_ESCAPE;
}
+
wxDirProperty::~wxDirProperty() { }
wxValidator* wxDirProperty::DoGetValidator() const
bool wxDirProperty::OnButtonClick( wxPropertyGrid* propGrid, wxString& value )
{
+ // Update property value from editor, if necessary
wxSize dlg_sz(300,400);
wxDirDialog dlg( propGrid,
if ( propGrid->IsMainButtonEvent(event) )
{
// Update the value
- PrepareValueForDialogEditing(propGrid);
+ wxVariant useValue = propGrid->GetUncommittedPropertyValue();
- wxString val1 = GetValueAsString(0);
+ wxString val1 = useValue.GetString();
wxString val_orig = val1;
wxString value;
IMPLEMENT_ABSTRACT_CLASS(wxArrayEditorDialog, wxDialog)
-#include <wx/statline.h>
+#include "wx/statline.h"
// -----------------------------------------------------------------------
const wxChar* cbt )
{
// Update the value
- PrepareValueForDialogEditing(propGrid);
+ wxVariant useValue = propGrid->GetUncommittedPropertyValue();
if ( !propGrid->EditorValidate() )
return false;
if ( strEdDlg )
strEdDlg->SetCustomButton(cbt, this);
- dlg->SetDialogValue( wxVariant(m_value) );
+ dlg->SetDialogValue( useValue );
dlg->Create(propGrid, wxEmptyString, m_label);
#if !wxPG_SMALL_SCREEN