CreateButton (Method)

From Legacy Roblox Wiki
Jump to navigationJump to search
CreateButton( String text, String caption, String icon )
Returns Button
Description: Returns a new ToolbarButton.
Member of: Toolbar



Example
local PluginManagerObject = PluginManager()
local Plugin = PluginManagerObject:CreatePlugin()
local Toolbar = Plugin:CreateToolbar("Hello World Plugin Toolbar")
local Button = Toolbar:CreateButton("Print Hello World", "Click this button to print Hello World!", "IconName.png")

This example creates a toolbar named Hello World Plugin Toolbar. The text next to it will say "Print Hello World" and when you hover over the button it will say "Click this button to print Hello World!" The icon it uses will be in the same folder as the script and is named "IconName.png"