PDA

View Full Version : Anchor to doubts



Xarxus
December 19th, 2020, 13:50
Here again. I have a frame and inside it I would like to insert a details button to open a new window.
I want it to be placed in the upper right corner. So I use an anchor for the button but ...
But if I use insidetopright, with any positive or negative offset, I don't see the button.
What am I doing wrong?

Frame
<frame_char name="MyFrame">

<bounds>240,20,-25,317</bounds>
</frame_char>

Option #1 - both positives
<button_details name="MyButton">

<anchored to="MyFrame" position="insidetopright" offset="30, 30" width="20"/>
...
</button_details>

Option #2 - negative - positive
<button_details name="MyButton">

<anchored to="MyFrame" position="insidetopright" offset="-30, 30" width="20"/>
...
</button_details>

Option #3 - positive - negative
<button_details name="MyButton">

<anchored to="MyFrame" position="insidetopright" offset="30, -30" width="20"/>
...
</button_details>

Option #4 - both negatives
<button_details name="MyButton">

<anchored to="MyFrame" position="insidetopright" offset="-30, -30" width="20"/>
...
</button_details>

Option #5 - both zeroes
<button_details name="MyButton">

<anchored to="MyFrame" position="insidetopright" offset="0, 0" width="20"/>
...
</button_details>

damned
December 19th, 2020, 14:42
The first value will be the x value and it will be how far inwards from the right
The second value will be the y value and it will be how far down from the top
Both should be positive
Maybe you have other conflicting in the "button_details" template?

Xarxus
December 19th, 2020, 14:56
Nope, or better, I don't think. This is the code

<template name="button_details">

<buttoncontrol>

<state icon="button_details" pressed="button_details_down" />
<script>

...
</script>
</buttoncontrol>
</template>

Xarxus
December 19th, 2020, 15:40
Ok, found out, it was more trivial... there was a problem with images.

I'm going to be ashamed in a corner...
:p