wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

I use a wxEnumProperty in a PropertyGrid, filled from a wxPGChoices container. This worked fine for some years now with version 2.9.3. Since my update to 3.1.1 i can not select an item. The combo control opens on click, but after select an other item, it is directly switched to the original item bevore. I tested to disable all "change" events and logged all grid events too for testing. Log an event object "onchange" will log every other object type i have in the propertygrid (wxFloatProperty,wxImageFileProperty,wxBoolProperty,wxColourProperty,..) but not the wxEnumProperty´s. This is for all wxEnumProperty´s the same in the whole property grid.

Did i miss a flag or some setting with the newer release ?

Example how i add the item:

Code: Select all

		pPropBaseName = m_PropGrid->Append(new wxEnumProperty(wxT("BaseName"),	wxPG_LABEL,	BaseChoices,0) );
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

i just changed the wxEnumProperty to wxEditEnumProperty and it works.... instead i do not want editable choices...

clearly the OnPropertyGridChange() does not be triggert otherwise
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by ONEEYEMAN »

Hi,
Can you reproduce it in a sample?

Also, which platform/toolkit you are using? Any non-default compile options used for building wxWidgets?

Thank you.
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

I compiled the samples and they work fine. My usage of the wx.. Dialogs and controls is in a big Application with about 45 dll´s and some GB data. It is not easy to extract that problem alone. I can do a new example, but i think it will work fine too.
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

Platform Toolset: Visual Studio 2012 - Windows XP (v110_xp)*
Visual Studio 2012 Prof.

The options are all default.

*Because of binary compatibility i need to use this. There are over 80 plugin-developer which develop plugins for their company data with visual studio.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by ONEEYEMAN »

Hi,
So what do you do differently from the sample?
Can you just try to add the code from your project to the sample until it breaks?
Or just do vice versa - comment out some code and see if it works?

Thank you.
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

Code to create the Prop-Grid itself:

Code: Select all


	m_PropGrid = new wxPropertyGrid(
		m_MBoxSizer->GetStaticBox(), // parent
		ID_PROPGRID, // id
		wxDefaultPosition, // position
		wxDefaultSize, // size
		// Some specific window styles - for all additional styles,
		// see Modules->PropertyGrid Window Styles
		/*wxPG_AUTO_SORT |*/ // Automatic sorting after items added
		wxPG_SPLITTER_AUTO_CENTER | // Automatically center splitter until user manually adjusts it
		// Default style
		wxPG_DEFAULT_STYLE );
	m_PropGrid->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(xxx::OnPropertyGridChange),NULL,this );
	m_PropGrid->Connect(wxEVT_PG_SELECTED, wxPropertyGridEventHandler(xxx::OnPropertyGridSelected),NULL,this );
	m_PropGrid->SetPropertyAttributeAll(wxPG_BOOL_USE_CHECKBOX, true);

Then just add this code from the example:

Code: Select all

   wxArrayString tchoices;
    tchoices.Add(wxT("Cabbage"));
    tchoices.Add(wxT("Carrot"));
    tchoices.Add(wxT("Onion"));
    tchoices.Add(wxT("Potato"));
    tchoices.Add(wxT("Strawberry"));
    m_PropGrid->Append( new wxEnumProperty(wxT("EnumProperty X"),wxPG_LABEL, tchoices ) );
That´s all. I use the whole wxStuff in a dll. The gui stuff i do with Dialogblocks. Julian Smart gave me a hint how to connect such things (projects, classes) without having an "exe"-project and update vice-versa with visual-studio and dialogblocks.
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

I tried it in a different project.. an exe ... works as it should.

There must something which disables the event handler for wxEnumProperty´s in my original project... or has a conflict..
Howie
Earned a small fee
Earned a small fee
Posts: 12
Joined: Fri Jan 20, 2012 1:28 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by Howie »

I switched back to 3.0.4. the last stable. Seemed to work fine.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by ONEEYEMAN »

Hi,
Really weird.
As I said, try to isolate an issue in the latest version.
Or maybe try to do a 'git bisect' on the wxWidgets to see what commit broke your project.

Then from that commit we will know more.

Thank you.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxEnumProperty, no Selection allowed since update to 3.1.1 from 2.9.3

Post by PB »

I wonder if it is not same as /related to https://trac.wxwidgets.org/ticket/18162
Post Reply