far.CreateUserControl

LuaFAR 3

far.CreateUserControl


Buffer support for DI_USERCONTROL. Use it like this:

local buffer=far.CreateUserControl(10,10)
local textel={Char="a",Attributes={Flags=bit64.bor(F.FCF_FG_4BIT,F.FCF_BG_4BIT),ForegroundColor=9,BackgroundColor=8}}
for ii=1,#buffer do
  buffer[ii]=textel
end
local items={
  {"DI_DOUBLEBOX",0,0,11,11,0,0,0,0,""},
  {"DI_USERCONTROL",1,1,10,10,buffer,0,0,0,""}
}