Alright, now i'm trying to add tabbers, based on the basic_notebook example.
Now i'm not 100% of this but i think a notebook is a tabber? (for an example on what i call a tabber see your Bmax IDE and see the top "Help" tabber + whatever files you have open)
anyways, here's my code, i see no tabber at the moment.. trying to figure this out.
see " 'body " under the MainWindow type, thats where i'm trying..
Thanks in advance
Now i'm not 100% of this but i think a notebook is a tabber? (for an example on what i call a tabber see your Bmax IDE and see the top "Help" tabber + whatever files you have open)
anyways, here's my code, i see no tabber at the moment.. trying to figure this out.
see " 'body " under the MainWindow type, thats where i'm trying..
SuperStrict 'import needed modules Framework wx.wxApp Import wx.wxFrame Import wx.wxComboBox Import wx.wxAui Import wx.wxTextCtrl Import wx.wxTreeCtrl Import wx.wxSpinCtrl Import wx.wxButton Import wx.wxBitmapButton Import wx.wxStaticText Import wx.wxArtProvider Import wx.wxColourDialog Import wx.wxPanel Import wx.wxNotebook Import wx.wxListBox 'consts Const wxDEFAULT_NO_RESIZE:Int = wxSYSTEM_MENU | wxMINIMIZE_BOX | .. wxMAXIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN | wxBORDER_STATIC 'global vars 'App stuff Type MyApp Extends wxApp Field frame:MainWindow Field box1:wxComboBox Method OnInit:Int() 'create window and show it frame = MainWindow(New MainWindow.Create(Null, -1, "POS Tracker", 200, 200, 800, 600, wxDEFAULT_NO_RESIZE)) frame.show() 'return successful Return True End Method End Type 'The window Type MainWindow Extends wxFrame 'fields 'constants 'Custom ID constants Const menu_Exit:Int = 201 Const tb_Add:Int = 202 Const tb_Remove:Int = 203 Const win_posadd:Int = 204 Const but_ok1:Int = 205 Const tabber:Int = 206 'fields Field Addpos:wxDialog Field notebook:wxNotebook '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 the 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() 'Body notebook = wxNotebook.CreateNotebook(Self, tabber) Local panel:wxPanel = wxPanel.CreatePanel(notebook) notebook.AddPage(panel, "Tab1", True) panel = wxPanel.CreatePanel(notebook) notebook.AddPage(panel, "Tab2", False) panel = wxPanel.CreatePanel(notebook) notebook.AddPage(panel, "Tab3", False) 'Create Add POS sub window, but don't show it yet Addpos = New wxDialog.Create_(Self,wxID_ANY , "Add POS",200 ,200 , 300, 500, wxSTAY_ON_TOP| wxDEFAULT_DIALOG_STYLE) MainWindow(Self).Addpos.Center(wxBOTH) Local ok:wxButton = New wxButton.Create(Addpos,wxID_Ok,"Ok",105,410) 'EVENT HANDLING Connect(menu_Exit, wxEVT_COMMAND_MENU_SELECTED, OnExit) Connect(tb_Add, wxEVT_COMMAND_TOOL_CLICKED, AddPOSWindow) Connect(wxID_Ok, wxEVT_COMMAND_BUTTON_CLICKED, AddPOSdone) End Method 'a function to handle exiting... Function OnExit(event:wxEvent) wxFrame(event.parent).Close(True) End Function 'show ADD POS window Function AddPOSWindow(event:wxEvent) MainWindow(event.parent).Addpos.ShowModal() End Function 'Adds a POS / ends the the dialog Function AddPOSdone(event:wxEvent) End Function End Type 'run the program New MyApp.run()
Thanks in advance