Author: bklaas
Date: Thu Feb 4 12:16:42 2010
New Revision: 8456
URL: http://svn.slimdevices.com/jive?rev=8456&view=rev
Log:
Bug: 15570
Description: SimpleMenu support for textareas in menu items
when adding a menu item,
to use a textarea,
textarea = 'blah blah'
to use a label,
text = 'blah blah'
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
Modified: 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua?rev=8456&r1=8455&r2=8456&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
(original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua Thu Feb
4 12:16:42 2010
@@ -138,15 +138,31 @@
end
if widgetList[i] == nil then
- widgetList[i] = Group(item.style or "item", {
- text = Label("text", item.text),
- check = check,
- icon = icon,
- arrow = arrow,
- })
+ if item.textarea then
+ local textarea =
Textarea('multiline_text', item.textarea)
+ textarea:setHideScrollbar(true)
+ textarea:setIsMenuChild(true)
+ widgetList[i] = Group(item.style or
"item", {
+ text = textarea,
+ check = check,
+ icon = icon,
+ arrow = arrow,
+ })
+ else
+ widgetList[i] = Group(item.style or
"item", {
+ text = Label("text",
item.text),
+ check = check,
+ icon = icon,
+ arrow = arrow,
+ })
+ end
else
widgetList[i]:setStyle(item.style or "item")
- widgetList[i]:setWidgetValue("text", item.text)
+ if item.textarea then
+ widgetList[i]:setWidgetValue("text",
item.textarea)
+ else
+ widgetList[i]:setWidgetValue("text",
item.text)
+ end
widgetList[i]:setWidget("icon", icon)
widgetList[i]:setWidget("check", check)
widgetList[i]:setWidget("arrow", arrow)
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins