Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

"Moving" buttons


This topic is 5824 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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?

Posted

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?

Posted (edited)

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
Posted

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"?

Posted

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

Posted

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

This topic is 5824 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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