From 8d950bdb5711cc68c94b892e04a60d00e6dfa344 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 5 Oct 1998 10:13:49 +0000 Subject: [PATCH 1/1] Repaired radiobox problem. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/dialoged/src/winprop.cpp | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/utils/dialoged/src/winprop.cpp b/utils/dialoged/src/winprop.cpp index 6e94d9fde5..7902ece0b9 100644 --- a/utils/dialoged/src/winprop.cpp +++ b/utils/dialoged/src/winprop.cpp @@ -117,7 +117,10 @@ wxDialogEditorPropertyListFrame::~wxDialogEditorPropertyListFrame() bool wxPropertyInfo::Edit(wxWindow *parent, const wxString& title) { if (sm_propertyWindow) - return FALSE; + { + sm_propertyWindow->Raise(); + return TRUE; + } int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width; int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height; @@ -1269,14 +1272,14 @@ wxProperty *wxRadioBoxPropertyInfo::GetProperty(wxString& name) } if (name == "orientation") { - char *pos = NULL; - if (propertyWindow->GetWindowStyleFlag() & wxHORIZONTAL) - pos = "wxHORIZONTAL"; + wxString orient; + if (propertyWindow->GetWindowStyleFlag() & wxRA_HORIZONTAL) + orient = "wxRA_HORIZONTAL"; else - pos = "wxVERTICAL"; + orient = "wxRA_VERTICAL"; - return new wxProperty("orientation", pos, "string", - new wxStringListValidator(new wxStringList("wxHORIZONTAL", "wxVERTICAL", + return new wxProperty("orientation", orient, "string", + new wxStringListValidator(new wxStringList("wxRA_HORIZONTAL", "wxRA_VERTICAL", NULL))); } else if (name == "values") @@ -1304,19 +1307,21 @@ bool wxRadioBoxPropertyInfo::SetProperty(wxString& name, wxProperty *property) { long windowStyle = radioBox->GetWindowStyleFlag(); wxString val(property->GetValue().StringValue()); - if (val == "wxHORIZONTAL") + if (val == "wxRA_HORIZONTAL") { - if (windowStyle & wxVERTICAL) - windowStyle -= wxVERTICAL; - windowStyle |= wxHORIZONTAL; + if (windowStyle & wxRA_VERTICAL) + windowStyle -= wxRA_VERTICAL; + windowStyle |= wxRA_HORIZONTAL; } else { - if (windowStyle & wxHORIZONTAL) - windowStyle -= wxHORIZONTAL; - windowStyle |= wxVERTICAL; + if (windowStyle & wxRA_HORIZONTAL) + windowStyle -= wxRA_HORIZONTAL; + windowStyle |= wxRA_VERTICAL; } radioBox->SetWindowStyleFlag(windowStyle); + wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(radioBox); + resource->SetStyle(windowStyle); wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(radioBox, this); return TRUE; -- 2.45.2