Kio4_Move Extension doesnt place button where I left it

what I think is simple seems to be not so simple.

I move button, save position, recall position, put the button back. It does not go back to where i originally put it.

the x,y position is used and written on the button , so its safe to say that the coordinates are being passed correctly.

this is my second attempt, from scratch, I got the same results.

screenshot shows the buttons with x,y. they are not where I expect them to be based on the x,y diplayed

Rooster32.aia (135.7 KB)

I have been quietly having a play around with this, and working with @Juan_Antonio.

When using KIO4_Move

  1. Everything works just fine in terms of button placement and recovery with real (non dynamic) buttons.
  2. Everything appears to work just fine in terms of button placement and recovery when using Comp Creator to generate dynamic buttons.
  3. Use of the Dynamic Components extension appears to generate vertical space for buttons after the first button, when recovering.

So perhaps consider options 1 or 2 for your project?

Ty! It will be a few hours before I get back to my desk I will try your suggestion

A slight correction, option 2 displays the same behaviour as option 3 if buttons are initially created individually and not as a group (as shown in my example above) :frowning:

If you were to move to real buttons, how many do you believe you will ever need on a single plan?
30? 50?

These can all be managed by changing their visible property, and using lists to handle their initial positioning when made visible and moveability (in the case of KIO4_Move). Once visible, their position and visibility can be saved to tinydb for recovery on next use.

Did we ever suggest using a canvas and imageSprites ? :wink:

Real buttons could work, 15 or 20 max probably.

Have not considered canvas yet

Here is a simple example using canvas and five sprites. (Needs work on setting/un-setting visibility)

canvasSpritePositioning.aia (12.6 KB)

How are you setting the text for your buttons at present? Looks like you have lists of some kind ? I can work something up to set labels on the sprites.

1 Like

@TIMAI2 @Juan_Antonio thank you both for your efforts today. I just got home to my desk. 9pm here in Savannah, GA USA. I am beat.
I will start tomorrow morning on the next round here. about 9 hours maybe.

I am setting the button in Device.GotText That is where it gets json data from device, and does through a few comparisons. in the middle of the JSON string there are is a list of 6 temperatures, the first one is room temperature. it set red or green, all the others set yellow will get you to the embedded web page of the first device will return the JSON String

from that point you probably know more than me :slight_smile:

Im at my desk now. should be here all day unless im called away for service work

Im going to try real buttons, I think there was a difficulty in getting a component id for them but, ill work until i hit a whammie

You do not need ids, just make a button component list and work with that.

1 Like

can I add comments that are not erased when clearing Do It text?

Not sure I understand what you mean ?

Anyway, herewith a revised canvas/sprite method
canvasSpritePositioningV2.aia (21.1 KB)

You enter the text (multiline) before you 'create' a sprite, otherwise you get the hint text.
Turn on the menu to generate a menu when you click a sprite (turn off menu after use)

  • Delete clears the sprite for later re-use
  • Edit allows to change the displayed text

Credits to Jerin Jacob (component2Image) and Kevinkun (Regex) for their extensions

thank you !

When I add comments to my blocks to explain what they do etc, and the DO IT

I'm pretty sure the answer is no. if you clear the DO IT results, the comments also clear

Use a variable block with text above your action block.


Called to work. Ill be gone a few hours
Thank you again!

@Kevin_Kesler , I have put an example with real buttons in:

I'm testing this extension, there may be bugs.

@Juan_Antonio Thank you!
I finally made it back to my desk. gonna try to make some headway.

The last button in my list is moved whenever I click on another button

I downloaded a fresh copy of the Ki04_Move Extension, and that seems to help.