Repositioning tool doesn't place button where I left it

dynamic buttons are created by pressing MAKE Button
Button XY are saved after each move
I've verified that the file contains the correct saved XY
Clear screen deletes all the buttons
Read button reads each Button and XY, creates button and drags to saved XY

where it shows up on the screen doesn't correlate to the saved position, or as far as I can tell, the XY set in the Drag to position Call.





UploadedReposition.aia (51.7 KB)

You can try storing the X and Y values in a TinyDB and parsing the value from there :slight_smile:

im storing the coordinates and then reading them and confirming them.
i dont know that it makes any difference where i store them if i verify they are whole in the end. but its worth a try

1 Like

still not resolved

still unresolved

I have reached the point in my project that I cannot move forward without fixing this issue.

I will explore other extensions, and possibly other ways to test and apply this extension.

I have had this extension work properly in 1 app, but i wasnt able to make the other half of that app work correctly.

Are two dimensions really needed here?

I can show how to reposition data in a list.

1 Like

this is what I'm trying to achieve
I want to be able to place the text over an image relative the actual location of the source sensor location

the underlying image is a floorplan or blueprint of an actual building.

the building floorplan will not always be the same so the text will need to be relocated.

also the number of sensor values being displayed will vary

In this example, i just made 8 new buttons. and let the app decide their default location upon creation.
I then dragged them , saved them, cleared screen and recalled them

next as a test I am going to attempt to do this without saving, just hard code in the locations and go from there, this will eliminate translation error


in its simplest form, it seems to work reliably.

i will scour my save routine and see if I can find an error

I overlooked something here.
screen size matters. the field for the buttons is about 400x600
the far right button should be about halfway down the screen
it appears that the movement it to the device screen size , not the app screen size.
the screen size displayed is from screen1.height and width

by those dimensions the components seem to be near expected position

here I have a mostly stable app, except the buttons don't stay where I put them.
I have test labels to show the whole file before writing and after reading which are daisy chained with AFTER SAVING BLOCK.

The top scroll views show the list of data when opened and before saving

Im now getting correctly the values back that i saved, and the xy is written in the button text, but the position of the button is clearly not what's written ON the button

ive included the relevant blocks and the aia

Rooster22.aia (196.5 KB)



RoosterConfig.txt (797 Bytes)

Try this one Rooster24.aia (208.5 KB)

Also change this because I forgot

1 Like

it works well.
it returns to the saved position

can the disparity between the object and the touch be lessened?

I cant drag an object to top of screen because of it. yes, it was like that before, also. as a work around, I can manually set the position or tweak it in the setup page

I uploaded screencast but you cant see my cursor so didn't illustrate much

many thank yous for helping.
it looks like you modified the extension not the body of my blocks so much.
aside from my blocks being elementary, there were no errors in blocks?

I found a few issues in my blocks that need to be cleaned up.
I have to go to work for a few hours.

I will post again after i get it cleaned up. When I look at the details of each button , im seeing the default xy not the saved xy.

this is a good time to thoroughly clean up.

Thank you so much for your help.

I got my housekeeping done.
now the app will not compile

next issue: seems the last button made before displaying is corrupt and subsequent adds do not appear.


Rooster25.aia (144.3 KB)

Try this one Rooster25b.aia (145.2 KB)

1 Like

I'm away from desk. Will be back in 30 minutes or so

working smoothly it seems
there is still a glitch with the last button. i will clean up my blocks this evening and test as much as i can.
i will be afk for a few hours

Thank you again!

You could also try this approach:

buttonPosition1.aia (26.5 KB)

I have used CompCreator instead of Dynamic Components, and KIO4_Move instead of Repositioning Tools. The only downside is that to "register" a button to move, you have to press it once, then press again and hold to move it. You have to do this each time. Last position of a button is always saved.

More of a proof of concept than anything else.

Credits @Kevinkun and @Juan_Antonio for their extensions.