Thread Rating:
  • 351 Vote(s) - 2.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
vboxのデータ追加について
10-18-2012, 04:05 PM,
#5
RE: vboxのデータ追加について
如果你需要控制特定元素的显示顺序, 当然需要对这个元素进行额外的操作。
虽然我有点不适特别清楚你的意图,你看能否这样:
在for循环中跳过pink (其实我不知你说的pink在哪里, 你的例子代码中并没有pink元素, 我假定pink被加到enum的第一个位置), 待其他元素都追加完毕后,最后加上pink。


{define-enum public ColorList

pink = "pink",
red = "brick",
white = "off",
green = "forest",
black = "night",
yellow = "sun",
blue = "true",
orange = "fruit",
purple = "royal"
}

{let box:VBox = {VBox background = "silver"}}
{def a:{Array-of ColorList} = {{Array-of ColorList}}}
{for color in ColorList do
{if color == ColorList.pink then
{a.append color}
{popup-message "continue"}
{continue}
}

{box.add {text color = color.name, {value color.value}}}

}

{for c in a do
{box.add
{text color = c.name, {value c.value}}
}
}

{value box}
Reply


Messages In This Thread
vboxのデータ追加について - by jianghu52 - 10-16-2012, 10:41 AM
RE: vboxのデータ追加について - by tdeng - 10-18-2012, 04:05 PM
RE: vboxのデータ追加について - by tdeng - 10-18-2012, 04:21 PM
RE: vboxのデータ追加について - by tdeng - 10-19-2012, 09:25 AM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('641')