wxPropGrid problem

BlitzMax Modules Forums/Brucey's Modules/wxPropGrid problem

Import wx.wxApp
Import wx.wxFrame
Import wx.wxPropGrid

Global App:MyApp = New MyApp
App.Run()
Type MyApp Extends wxApp
	Field Window:tlinkobjectwindow
	Method oninit:Int()
		Window = tlinkobjectwindow(New tlinkobjectwindow.Create())
		window.show()
		Return True
	End Method
End Type

Type TLinkObjectWindow Extends wxFrame
	Field Panel:wxPanel
	Field lstProperties:wxPropertyGrid
	Method OnInit() 

 		Self.lstProperties = MyPropertyGrid(New MyPropertyGrid.Create(Self , 1,0,0,300 ,300, wxPG_BOLD_MODIFIED | wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE)) 

		Local TestChoices:wxPGChoices = New wxPGChoices.Create() 

		TestChoices.add("One",2147483647)
		TestChoices.add("Two",5)
		TestChoices.add("Three",1)
		TestChoices.add("Four",3)
		
		AddLOProperty_Choices("Testo",testchoices,0)
		Self.lstProperties.Refresh()
	End Method
	
	Method AddLOProperty_Choices(Name:String, Choices:wxPGChoices, Value:Int) 
		Local PEnum:wxEnumProperty = wxEnumProperty(New wxEnumProperty.CreateWithChoices(Name, 0, Choices, Value)) 
		Local Prop:wxPGProperty = wxPGProperty(PENum) 
		Self.lstProperties.Append(Prop) 
	End Method 
End Type



Type MyPropertyGrid Extends wxPropertyGrid

End Type


Click option 'Two' and 'Three' to see the issue (assuming it's not only occuring for me).

The values within those choices are the cause of the bug, but shouldn't it work with any int inputted, regardless of value?

No apparent issues on MacOS.. I'll have a look on Windows when I get to work.

What problem are you having?

Fast response =o

When I select two, it selects 'nothing' (blank), when I select three, it selects two.

Appears to be working fine here on XP, BlitzMax 1.30, with up-to-date (from SVN) wxMax.

Shows One when it starts, then I choose Two, and it shows Two in the combo, and it changes to Bold at the same time.
Three also works.

Are you thinking there's some kind of overflow with the value from One?

blah, Svn problem. Sorry for wasting your time brucey. It kept telling me it was up to date, when it wasn't.

Are you thinking there's some kind of overflow with the value from One?


Yeah, or doing 'AddSort' with the 'add' function or something weird.

It's working perfect now.