aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples
diff options
context:
space:
mode:
Diffstat (limited to 'Samples')
-rw-r--r--Samples/ShowCase/ShowCase.cs2
-rw-r--r--Samples/ShowCase/ui/showcase.crow8
2 files changed, 8 insertions, 2 deletions
diff --git a/Samples/ShowCase/ShowCase.cs b/Samples/ShowCase/ShowCase.cs
index db91b1cf..23b7b151 100644
--- a/Samples/ShowCase/ShowCase.cs
+++ b/Samples/ShowCase/ShowCase.cs
@@ -78,7 +78,7 @@ namespace ShowCase
public static Picture IcoPaste = new SvgPicture ("#Icons.paste-on-document.svg");
public Command CMDNew, CMDSave, CMDSaveAs, CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste;
-
+ public CommandGroup ContextCommands => new CommandGroup (CMDNew, CMDSave, CMDSaveAs);
void initCommands ()
{
CMDNew = new Command (new Action (onNewFile)) { Caption = "New", Icon = "#Icons.blank-file.svg", CanExecute = true };
diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow
index 6924fb54..779078fb 100644
--- a/Samples/ShowCase/ui/showcase.crow
+++ b/Samples/ShowCase/ui/showcase.crow
@@ -17,9 +17,15 @@
<Button Style="IcoButton" Command="{CMDNew}" />
<Button Style="IcoButton" Command="{CMDSave}" />
<Button Style="IcoButton" Command="{CMDSaveAs}" />
+ <Widget Width="Stretched"/>
+ <Label Text="Line:" Foreground="Grey"/>
+ <Label Text="{../../tb.CurrentLine}" Margin="2"/>
+ <Label Text="Col:" Foreground="Grey"/>
+ <Label Text="{../../tb.CurrentColumn}" Margin="2"/>
</HorizontalStack>
<HorizontalStack>
- <TextBox Name="tb" Text="{²Source}" Multiline="true" Font="consolas, 12" Focusable="true" Height="Stretched" Width="Stretched" />
+ <TextBox Name="tb" Text="{²Source}" Multiline="true" Font="consolas, 12" Focusable="true" Height="Stretched" Width="Stretched"
+ ContextCommands="{ContextCommands}"/>
<ScrollBar Value="{²../tb.ScrollY}"
LargeIncrement="{../tb.PageHeight}" SmallIncrement="1"
CursorRatio="{../tb.ChildHeightRatio}" Maximum="{../tb.MaxScrollY}" />