I need to create a draggable button. The drag starts from multiple source and ends at a sink. Is there any way to get position of the sources and the sink after creation of the page.
Container {
horizontalAlignment: HorizontalAlignment.Fill
Label {
id: preId
preferredWidth: 700
text: rootContainer.data.part1
multiline: true
textStyle {
textAlign: TextAlign.Center
color: Color.Black
}
horizontalAlignment: HorizontalAlignment.Center
}
}
Container {
horizontalAlignment: HorizontalAlignment.Center
SinkButton {
id: sinkId
preferredHeight: 100
preferredWidth: 686
textColor: Color.Black
enabled: false
layoutProperties: AbsoluteLayoutProperties {
}
}
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
topPadding: -5
bottomPadding: squareDisplay ? 10 : 50
Label {
id: postId
text: rootContainer.data.postData
multiline: true
textStyle {
textAlign: TextAlign.Center
color: Color.Black
}
horizontalAlignment: HorizontalAlignment.Center
}
}
}
I want to know the position of "sinkId" relative to the window. Its position varies depending on "preId" text length. LayoutUpdateHandler
is a possible solution but layoutFrame.x
or layoutFrame.y
always comes zero on checking. Is there any way to get position of any visual node on/after page creation?