ui.newButton, get text of button?? Please Help.

I’m using the latest version of the enhanced UI new button.

I am trying to see what the text value of the button is.

But what i get is this value… table: 00CD54F0

[code]
local showList = function( event )
print(btnShowList.text)
end

btnShowList = ui.newButton{
defaultSrc = “images/buttonsmall.png”,
overSrc = “images/buttonsmallover.png”,
defaultX=70, defaultY=30, overX = 70, overY = 30, x = 40; y = 20,
onRelease = showList,
id = “btnShowList”,
text = “Show List”, size = 12,
emboss=true
}
[/code] [import]uid: 11860 topic_id: 22186 reply_id: 322186[/import]

Change to;

[lua]local showList = function( event )
print(btnShowList.text.text)
end[/lua]

Will work :slight_smile: [import]uid: 52491 topic_id: 22186 reply_id: 88284[/import]

You know I almost tried that, I thought certainly that’s not how to do it.

But I guess I was wrong…

I’ll give it a go, thanks much.

Larry [import]uid: 11860 topic_id: 22186 reply_id: 88399[/import]

Sometimes it can be a bit that way :wink: Good luck! [import]uid: 52491 topic_id: 22186 reply_id: 88572[/import]