Widget Candy. .Get()

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

Code for Snippet:

                
 
 
Returns the current value of the specified widget property.
 
-- 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!",
	} )
 
-- GET THE CAPTION OF THIS BUTTON
print( _G.GUI.Get("Button1", "caption") )
 
GetHandle (widgetName, valueName)
 
widgetName	(String) The name of a widget.
 
valueName	(String) The valid name of a widget property ("name", "caption", "x", "y", "textAlign" etc.).
 
Returns:	(Misc) The current value of the specified widget property.
 
 
 
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: 21
Date Added: 2018-01-10 14:36:25
Last Modified: 2018-01-10 09:54:13

Web Analytics