Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"Moving" buttons

Featured Replies

Instead of tabs, I want to use a "phrase" of merged fields, devided by a fixed space (set in a space field). The problem is of course that the words in the "phrase" will change its position, due to variable lengths of the words.

My wish is to be able to create buttons over these words, but how to make these buttons (or relative coordinates) to move with the position of the words?

I've been thinking of making a row of buttons. Than when activating one of these, the script first calculates which word is under it before executing the script belonging to that word.

But this sounds like a horrible amount of variables. Somebody have a suggestion for an easier solution?

Edited by Guest

Buttons cannot move. However, you can make sure that each piece of text maintains a fixed position, by separating them with the tab character.

Also, you can place merge field/s into the button itself.

Edited by Guest

  • Author

I know they can not move. That's why I was thinking making a row of buttons, each calculating what text is under it, at that moment.

Remember, the "phrase" consists of (text) & (space field) & etc.

I do not think it is possible to use tabs in that.

And what happens if the word gets so long that it passes the tab mark?

  • Author

I take that back (tabs can not be used). But the result is horrible :B

So back to zero

Maybe I don't understand what you mean by "calculating what text is under it, at that moment". If there are 4 buttons, there can be (at most) 4 pieces of text (let's call them 'labels'). Why do we need to calculate anything?

  • Author

Yes, this is complicated. I guess I need maybe 10 or 15 buttons. (there is place for 5 words).

If the words are long, say 10 chars, and the "space" is 5 chars, than the last word will be situated at the end of the page. However if each word is 3-4 chars and the "space" is 3 chars, than the last word will be situated about in the middle of the page. So the button i the middle of the page, must maybe cover either word 3 or 4 or 5.

It seems to me that pressing a button must activate a calculation to determine how long the phrase is, and according to that execute the right script.

Edited by Guest

You would need to use a monospaced font, and place a series of very small buttons (one for each possible character) in order to make this work. Even then it would depend on the font being exactly the same as the one you have used, so it probably wouldn't be cross-platform. And the user experience would be weird, with only the clicked character highlighting. IOW, a lot of work for an iffy result. Why not simply use "full justification"?

  • Author

I agree, that would be easier for me, but it does not look very nice (ugly in my eyes) :

Yes I use mono space. Although I do not think I need a button for each char. The shortest sequence is likely not going to be less than say 5 or 6 chars. and the longest not more than maybe 12 to 15.

It looks like me making a lot of calculations :B

I do not think I need a button for each char. The shortest sequence is likely not going to be less than say 5 or 6 chars.

You could make do with one button for the first 5 or 6 characters - but you would still need a single-character button for all possible following characters.

I agree, that would be easier for me, but it does not look very nice

Then make it look nice. :B

  • Author

:B I'll enter my meditation box now. See what the result will be.

Thanks

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.