aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/HelloWorld
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-06 13:40:54 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-06-06 13:40:54 +0200
commitc928fc85cd1faed7273722f99b2a1edd9de14299 (patch)
treef9344290fb876906205f9d8ab4b401ec3d040250 /Samples/HelloWorld
parentd88c47659d248dbf5b4ec2b071906fafe013011e (diff)
slider as base for scrollbar, gauge widget
Diffstat (limited to 'Samples/HelloWorld')
-rw-r--r--Samples/HelloWorld/ui/helloworld.crow41
1 files changed, 39 insertions, 2 deletions
diff --git a/Samples/HelloWorld/ui/helloworld.crow b/Samples/HelloWorld/ui/helloworld.crow
index b3facb0e..82fd4ab5 100644
--- a/Samples/HelloWorld/ui/helloworld.crow
+++ b/Samples/HelloWorld/ui/helloworld.crow
@@ -1,2 +1,39 @@
-<?xml version="1.0"?>
-<Label Text="Hello world -|${TestCst}|-"/> \ No newline at end of file
+<Container Background="Onyx">
+ <VerticalStack Background="Jet" Fit="true" Margin="1" Spacing="1">
+ <Gauge Width="200" Height="10" Background="RoyalBlue" Value="50" CornerRadius="5"/>
+ <NumericControl Width="200" Height="10" Value="40">
+ <Template>
+ <Gauge Maximum="{./Maximum}" Foreground="Black" BorderWidth="1" Background="RoyalBlue" Value="{./Value}" CornerRadius="5"/>
+ </Template>
+ </NumericControl>
+ <Gauge Width="10" Height="100" Background="RoyalBlue" Value="50" CornerRadius="5" Orientation="Vertical"/>
+ <HorizontalStack Width="400" Height="300">
+ <Scroller Name="scroller1" Background="White"
+ Margin="2" ScrollY="{../scrollbar1.Value}"
+ ValueChanged="./_scroller_ValueChanged">
+ <Widget VerticalAlignment="Top" Background="vgradient|0:1,0,0,1|1:0,1,0,1" Width="1000" Height="1000"/>
+ </Scroller>
+ <Slider Template="#Crow.VScrollBar.template" Name="scrollbar1" Value="{../scroller1.ScrollY}"
+ LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" Height="Stretched"
+ CursorSize="{../scroller1.ChildHeightRatio}"
+ Maximum="{../scroller1.MaxScrollY}" Orientation="Vertical" Width="14" >
+ <Template>
+ <Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}">
+ <GenericStack Orientation="{./Orientation}" Spacing="0">
+ <Shape Style="ArrowBut" MouseDown="./OnDecrease"
+ Height="10" Size="10,10" Path="M 4.5,0.5 L 9.5,9.5 L 0.5,9.5 Z F"/>
+ <Gauge Name="Slider"
+ Orientation="{./Orientation}"
+ Value="{²./Value}"
+ Maximum="{./Maximum}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ Background="RoyalBlue" Foreground="{./Foreground}"/>
+ <Shape Style="ArrowBut" MouseDown="./OnIncrease"
+ Height="10" Size="10,10" Path="M 0.5,0.5 L 9.5,0.5 L 4.5,9.5 Z F"/>
+ </GenericStack>
+ </Border>
+ </Template>
+ </Slider>
+ </HorizontalStack>
+ </VerticalStack>
+</Container> \ No newline at end of file