How to avoid/change shortcuts for buttons in dialog

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Davte
Posts: 16
Joined: Sat Sep 10, 2016 11:29 pm
Location: Italy

How to avoid/change shortcuts for buttons in dialog

Post by Davte »

When I add a button (or even fixed text), manually or at runtime, in a dialog, a letter gets underlined and becomes shortcut for that key (see picture).
Image
Often it's useful, but I would like to manage this process and be able to set it off.
I x-rayed the whole object but couldn't find a property or method with a suggestive name, so I'm asking if anyone knows the name of the property/method and eventually how it works and how to interfere.
Thank you in advance,
Davide
OpenOffice 4.1.2 on Windows 10
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: How to avoid/change shortcuts for buttons in dialog

Post by JohnSUN-Pensioner »

Just use tilda (~) to define one character of the label as a mnemonic
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
Davte
Posts: 16
Joined: Sat Sep 10, 2016 11:29 pm
Location: Italy

Re: How to avoid/change shortcuts for buttons in dialog

Post by Davte »

Thank you a lot! This was useful for changing the underlined letter. What if I want to prevent any letter to be underlined (i.e. no shortcut for this button)?
OpenOffice 4.1.2 on Windows 10
Post Reply