wx.Listbox and FlexGridSizer

BlitzMax Modules Forums/Brucey's Modules/wx.Listbox and FlexGridSizer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The code below compiles and runs but i don't know where the docs are for FlexGridSizer so i can't find what the number "5" on the end of this line means:

flex.Add(New wxListBox.Create(panel, -1, strings,200,200,100,100,wxlb_single), 1, wxALL | wxALIGN_CENTRE, 5)

also why isn't the Listbox being positioned at 200.200 and 100*100 wide/deep?


SuperStrict

Framework wx.wxApp
Import wx.wxFrame
Import wx.wxAui
Import wx.wxListBox
Import wx.wxButton
Import wx.wxStaticText
Import wx.wxHtmlWindow			' this has the wxPanel in it...


New MyApp.run()

Type MyApp Extends wxApp

	Field frame:MyFrame

	Method OnInit:Int()

		frame = MyFrame(New MyFrame.Create(,,"wxAUI Sample Application", , , 800, 600,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER))

		SetTopWindow(frame)
		
		frame.show()
		
		Return True
	
	End Method

End Type

Type MyFrame Extends wxFrame

	Field manager:wxAuiManager
	Field notebookStyle:Int
	Field notebookTheme:Int
		
	Method OnInit()

		' tell wxAuiManager to manage this frame
		manager = New wxAuiManager.Create(Self)

		SetMinSize(400, 300)
		
		' add a bunch of panes
		manager.AddPaneInfo(CreateNotebook(), New wxAuiPaneInfo.Create().Name("notebook_content").CenterPane().PaneBorder(False))
		
	End Method

	Method CreateNotebook:wxAuiNotebook()
		' create the notebook off-window to avoid flicker
		Local width:Int, height:Int
		GetClientSize(width, height)

		Local ctrl:wxAuiNotebook = New wxAuiNotebook.Create(Self, wxID_ANY, width, height, 430, 200, notebookStyle)
		
		Local panel:wxPanel = New wxPanel.Create(ctrl, wxID_ANY)
		Local flex:wxFlexGridSizer = New wxFlexGridSizer.Create( 2 )

'		flex.Add(New wxStaticText.Create(panel, -1, "wxTextCtrl"), 0, wxALL | wxALIGN_CENTRE, 5)
		
'		DebugStop
		Local strings:String[] = ["1","2"]
		flex.Add(New wxListBox.Create(panel, -1, strings,200,200,100,100,wxlb_single), 1, wxALL | wxALIGN_CENTRE, 5)
		panel.SetSizer(flex)
		ctrl.AddPage(panel, "Glenns wxPanel", False, Null  )
	
		Return ctrl
	End Method
	
End Type


Cheers
Glenn