Add linking the navigation bar with the content
example
#7746
Unanswered
jesses2025smith
asked this question in
Q&A
Replies: 2 comments 10 replies
-
Do you have the code for this example? That would make it clearer what you actually want to do. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Would this get you started? import { Button, HorizontalBox, ScrollView, AboutSlint } from "std-widgets.slint";
export component Demo {
property <string> positional-color: "red";
height: 100px;
HorizontalBox {
ScrollView {
VerticalLayout {
red := Rectangle {
background: Colors.red;
height: 200px;
}
green := Rectangle {
background: Colors.green;
height: 200px;
}
blue := Rectangle {
background: Colors.blue;
height: 200px;
}
}
changed viewport-y => {
if self.viewport-y <= -400px {
root.positional-color = "blue";
} else if self.viewport-y <= -200px {
positional-color = "green";
} else {
positional-color = "red";
}
}
}
Text {
text: root.positional-color;
}
}
} |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Like:
Beta Was this translation helpful? Give feedback.
All reactions