View Single Post
03/08/18, 10:59 PM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
The easiest way to create buttons is using XML files. If you need it to be 'on demand' in a sense, then you can create a virtual control in an XML file, and create a button from that virtual template whenever you need it.

However, if you really want to create it from scratch in Lua, you can use WindowManager:CreateControl(string arg1, object parent, number type), with CT_BUTTON as the type. Or you can use WindowManager:CreateControlFromVirtual with some ZOS defined virtual template.
  Reply With Quote