Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide demo tab when the demo is None #1456

Merged
merged 1 commit into from
Dec 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 41 additions & 19 deletions ets-demo/etsdemo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,27 +887,49 @@ def get_children(self):
visible_when="source is not None",
),
),
Tabbed(
UItem(
"demo",
style="custom",
resizable=True,
),
Item(
"log",
style="readonly",
editor=CodeEditor(
show_line_numbers=False,
selected_color=0xFFFFFF
VGroup(
Tabbed(
UItem(
"demo",
style="custom",
resizable=True,
),
Item(
"log",
style="readonly",
editor=CodeEditor(
show_line_numbers=False,
selected_color=0xFFFFFF
),
label="Output",
show_label=False
),
label="Output",
show_label=False
Item(
"locals",
editor=ShellEditor(share=True),
label="Shell",
show_label=False
),
visible_when='demo is not None',
),
Item(
"locals",
editor=ShellEditor(share=True),
label="Shell",
show_label=False
Tabbed(
Item(
"log",
style="readonly",
editor=CodeEditor(
show_line_numbers=False,
selected_color=0xFFFFFF
),
label="Output",
show_label=False
),
Item(
"locals",
editor=ShellEditor(share=True),
label="Shell",
show_label=False
),
visible_when='demo is None',
),
),
dock="horizontal",
Expand Down