BANK=wx.wxDialog(PANEL,-1,"",wx.wxPoint(-1,-1),wx.wxSize(426,266))
local X,Y
--for I=1,32 do  Y=math.mod(I-1,4)  X=Y*104+4  Y=(I-Y-1)/4*29+8                   -- Fold sequence into 2D H-scan, Coordinate*Scale+Offset.
for I=1,32 do  Y=math.mod(I-1,8)  X=(I-Y-1)/8*104+4  Y=Y*29+8                   -- Fold sequence into 2D V-scan, Coordinate*Scale+Offset.
    VT[I]=wx.wxButton(BANK,I+400,"",wx.wxPoint(X,Y),wx.wxSize(101,24),64)       -- Lay out bank voice buttons on dialog. Style=64=wx.wxBU_LEFT.
end

CNFG=wx.wxDialog(PANEL,-1,"Program Configuration",wx.wxPoint(-1,-1),wx.wxSize(426,266))
wx.wxStaticBox(CNFG,-1,"Envelope Display Mode",wx.wxPoint(9,5),wx.wxSize(402,94))
EDMC={}                                                                         -- EDMC=Envelope Display Mode Control
EDMC[0]=wx.wxRadioButton(CNFG,500,"Mode 1:  R1,L1,R2,L2,R3,L3,R4,L4.  (Useful when programming new data.)  ",wx.wxPoint(20,28),wx.wxSize(-1,14))
EDMC[1]=wx.wxRadioButton(CNFG,501,"Mode 2:  R1,R2,R3,R4,L1,L2,L3,L4.  (Useful when entering existing data.)    ",wx.wxPoint(20,48),wx.wxSize(-1,14))
wx.wxStaticText(CNFG,-1,"Note!  Restart the program to see the result of envelope display mode changes.",wx.wxPoint(22,74),wx.wxSize(-1,14))
wx.wxStaticBox(CNFG,-1,"MIDI Device Number",wx.wxPoint(9,108),wx.wxSize(402,50))
DEVC=wx.wxSpinCtrl(CNFG,-1,"",wx.wxPoint(22,126),wx.wxSize(37,20),wx.wxSP_ARROW_KEYS,1,16,DEV)
wx.wxStaticText(CNFG,-1,"Remote machine address taken from file, or preset here before saving.",wx.wxPoint(64,129),wx.wxSize(-1,14))
CNFG_OK=wx.wxButton(CNFG,wx.wxID_OK,"Save Config",wx.wxPoint(72,204),wx.wxSize(100,24))
CNFG_CA=wx.wxButton(CNFG,wx.wxID_CANCEL,"Cancel",wx.wxPoint(249,204),wx.wxSize(100,24))
