As the title says, I want to create a sub window under the main window, to add a 'pos' after you push a button in the tool bar it'll pop up..
heres my code so far... after i push the button nothing happens though... any ideas?
heres the chunk of code in question...
heres my code so far... after i push the button nothing happens though... any ideas?
heres the chunk of code in question...
'The window Type myFrame Extends wxFrame 'constants Const menu_Exit:Int = 201 Const tb_Add:Int = 202 Const tb_Remove:Int = 203 Const win_posadd:Int = 204 'on start up... Method OnInit() 'MENU BAR Local mb:wxMenuBar = New wxMenuBar.Create() Local fileMenu:wxMenu = New wxMenu.Create() fileMenu.Append(menu_Exit, "Exit") mb.Append(fileMenu,"File") SetMenuBar(mb) 'STATUS BAR CreateStatusBar() SetStatusText("Welcome to POS Tracker!") 'toolbar Local tb1:wxToolBar = New wxToolBar.Create(Self, wxID_ANY, ,, ,, wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT) tb1.SetToolBitmapSize(20, 20) tb1.AddTool(tb_Remove, "Remove POS", wxArtProvider.GetBitmap(wxART_ERROR,,20,20)) tb1.AddTool(tb_Add, "Add POS", wxArtProvider.GetBitmap(wxART_ADD_BOOKMARK,,20,20)) tb1.Realize() 'EVENT HANDLING Connect(menu_Exit, wxEVT_COMMAND_MENU_SELECTED, OnExit) Connect(tb_Add, wxEVT_COMMAND_BUTTON_CLICKED, CreateAddPOSWindow) End Method 'a function to handle exiting... Function OnExit(event:wxEvent) wxFrame(event.parent).Close(True) End Function 'Create a Add POS window... Function CreateAddPOSWindow(event:wxEvent) Local Addpos:wxWindow = New wxWindow.CreateWin(wxFrame(event.parent),win_posadd,,,300,200,wxDEFAULT_NO_RESIZE) End Function End Type