Skip to content

Commit

Permalink
example: improve notebook example (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuDartiailh committed Nov 8, 2018
1 parent db2708e commit e8600d0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/widgets/notebook.enaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
# Copyright (c) 2013-2018, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
Expand Down Expand Up @@ -39,10 +39,22 @@ enamldef Main(Window):
Container:
PushButton:
text = 'Open Bar Page'
enabled << not bar.visible
clicked :: bar.open()
PushButton:
text = 'Open Baz Page'
enabled << not baz.visible
clicked :: baz.open()
PushButton:
text = 'Go to Bar Page'
enabled << bar.visible
clicked ::
nbook.selected_tab = 'bar_page'
PushButton:
text = 'Go to Baz Page'
enabled << baz.visible
clicked ::
nbook.selected_tab = 'baz_page'
CheckBox:
text = 'Tabs Closable'
checked := nbook.tabs_closable
Expand All @@ -59,6 +71,7 @@ enamldef Main(Window):
nbook.tab_style = 'preferences'
Page: bar:
title = 'Bar Page'
name = 'bar_page'
Container:
Field:
pass
Expand All @@ -68,6 +81,7 @@ enamldef Main(Window):
pass
Page: baz:
title = 'Baz Page'
name = 'baz_page'
Container:
padding = 0
Html:
Expand Down

0 comments on commit e8600d0

Please sign in to comment.