diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-02-15 15:07:20 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-02-15 15:07:20 +0100 |
| commit | bbada8a0836b0c41350f6f9878ead8986dde9377 (patch) | |
| tree | f521aaf302294eab178799160488d675b2c470d2 /Samples | |
| parent | 0ed55f30954b5fb43ea68dc4e0e62266f7afbffb (diff) | |
unshownpostaction for visible state, Label.SetCurrentLocation bound check
Diffstat (limited to 'Samples')
| -rw-r--r-- | Samples/ShowCase/ShowCase.cs | 2 | ||||
| -rw-r--r-- | Samples/ShowCase/ui/showcase.crow | 8 |
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}" /> |