Skip to content

Commit

Permalink
Docs modified
Browse files Browse the repository at this point in the history
  • Loading branch information
v1993 committed Mar 24, 2017
1 parent 31fd8f2 commit 511d355
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/gtk.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ creation section of previous example can be simplified to:
[PersonColumn.EMPLOYEE] = true,
}

Note that you also can use numbers or strings as indexes. Useful
example is reading values selected from `Gtk.ComboBox`:

local index = MyComboBox:get_active() -- Index is string, but numbers is also supported
print("Active index: ", index)
print("Selected value: ", MyStore[index])

Note that while the example uses `Gtk.ListStore`, similar overrides
are provided also for `Gtk.TreeStore`.

Expand Down

0 comments on commit 511d355

Please sign in to comment.