Skip to content

Instantly share code, notes, and snippets.

@pkulchenko
Created May 11, 2016 22:28
Show Gist options
  • Select an option

  • Save pkulchenko/adafcd82c59f1553ecfcd5560bc2cb25 to your computer and use it in GitHub Desktop.

Select an option

Save pkulchenko/adafcd82c59f1553ecfcd5560bc2cb25 to your computer and use it in GitHub Desktop.
Minimal wxlua demo with two editors in tabs
require "wx"
local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Demo",
wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE)
local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxDefaultSize, wxaui.wxAUI_NB_DEFAULT_STYLE)
local e1 = wxstc.wxStyledTextCtrl(frame, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_NONE)
local e2 = wxstc.wxStyledTextCtrl(frame, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_NONE)
notebook:AddPage(e1, "Page 1", true)
notebook:AddPage(e2, "Page 2", true)
frame:Show(true)
wx.wxGetApp():MainLoop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment