Page 1 of 1

Underline first letter

Posted: Fri Aug 29, 2025 10:11 am
by CAsba
Hi all,
Is there a way to underline the first character of a button's label ? In this case, an underlined 'N' at the beginning of 'Next' would indicate to the user that a keyboard shortcut is available (Ctrl + N).

Re: Underline first letter

Posted: Fri Aug 29, 2025 11:16 am
by Klaus
Hi CAsba,

looks like we cannot have this in a button LABEL, only for the text of fields. :(
You need to "fake" something like this with an extra field or another button or whatever.
Or just use a FIELD with a script instead of a button.


Best

Klaus

Re: Underline first letter

Posted: Fri Aug 29, 2025 11:22 am
by richmond62
Not that I can see.

My way of dealing with this is to use images-as-buttons.

Re: Underline first letter

Posted: Fri Aug 29, 2025 11:25 am
by richmond62
Kalus's idea is OK up to the point that when you take your pointer over the field the cursor will change to an 'insert'.

So, I'd set up a field to look like the sort of button I want and then import a snapshot of it so you have an image looking exactly the way you want. 8)

Re: Underline first letter

Posted: Fri Aug 29, 2025 11:42 am
by Klaus
richmond62 wrote:
Fri Aug 29, 2025 11:25 am
Kalus's idea is OK up to the point that when you take your pointer over the field the cursor will change to an 'insert'.
...
Oh, come on, of course I presume that the field will be set up correctly to act as a button (locktext = TRUE etc...)

P.S.
A propos: Kalus
Are you lefthanded?
I am and also do this sometimes, since my left hand is obiously faster than my right one. :-)

Re: Underline first letter

Posted: Fri Aug 29, 2025 12:16 pm
by richmond62
No, not lefthanded, just cackhanded. 8)

Re: Underline first letter

Posted: Fri Aug 29, 2025 12:26 pm
by Klaus
richmond62 wrote:
Fri Aug 29, 2025 12:16 pm
No, not lefthanded, just cackhanded. 8)
:D :D :D

Re: Underline first letter

Posted: Fri Aug 29, 2025 12:54 pm
by richmond62
One of the annoying things is that IF one uses a field as a faux button, and the text is BOLDED, on underlining the first letter of that text that letter is de-BOLDED:
-
SShot 2025-08-29 at 14.53.36.png
-
UNLESS one is careful to REITERATE the BOLDING:
-
SShot 2025-08-29 at 14.54.50.png

Re: Underline first letter

Posted: Fri Aug 29, 2025 1:52 pm
by dunbarx
Much ado about little.
UnderlineButton.livecode.zip
(1.16 KiB) Downloaded 26 times
Craig