Widget Candy. .Show()

Send Snippet To: Save this snippet to Code Collector Pro -- view all roger's snippets
language: Other
license: Other

Code for Snippet:

                
 
 
 
Shows or hides a widget, with or without a fade animation.
 
-- LOAD THE LIBRARY AND USE A GLOBAL VAR TO STORE A REFERENCE:
_G.GUI = require("widget_candy")
 
-- CREATE A BUTTON
_G.GUI.NewButton(
	{
	x       = 50,
	y       = 50,
	theme   = "MyTheme",
	name    = "Button1",
	caption = "HELLO!",
	} )
 
-- FADE-OUT AND HIDE THE BUTTON
_G.GUI.Show("Button1", false, true )
 
Show (widgetName, isVisible, animated)
 
widgetName	(String) The name of a widget.
 
isVisible	(Boolean) Shows (true) or hides (false) the specified widget.
 
animated	(Boolean) If set to true, the widget will be shown or hidden smoothly (using a fade-in or fade-out animation).
 
 
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 22
Date Added: 2018-01-10 14:45:54
Last Modified: 2018-01-10 09:54:13

Web Analytics