1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ListViewにlabelをならべてなんかテキストボックスっぽい感じにしよう

Last updated at Posted at 2014-09-21
list_items = 
[
{text: 'ほげほげ'},
{text: 'ふがふが'},
{text: 'ふー'},
{text: 'ばー'},
]

これを

labels_list_with_format(list_items)

こうするといい感じになった

    def labels_list_with_format(list_items)
      list_items.each do |li|
        @script_list.items << label(text: li[:text]) 
      end
    end

さらに

list_items = 
[
{type: button, text: 'ほげほげ', action: 'hoge'},
{type: button, text: 'ふがふが', action: 'fuga'},
{type: button, text: 'ふー', action: 'foo'},
{type: button, text: 'ばー', action: 'bar'},
]

こうするとボタン一覧とかもできる

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?