Dialog box accelerator

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Newent
Posts: 6
Joined: Mon Feb 04, 2008 2:06 pm

Dialog box accelerator

Post by Newent »

I've struggled my way through creating a dialog but there is still one thing I can't figure out. How do you add an accelerator to a label (i.e. underscore a letter) and then associate that label with another control, such as a text box. For example, if I press ALT+A the focus is taken to the text box adjacent to the label that has the A accelerator.
OOo 2.31 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dialog box accelerator

Post by Villeroy »

AFAIK there is no API to control the accelerators. They are somehow automagic when you take care of the tab order (label before listbox).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
B Marcelly
Volunteer
Posts: 1160
Joined: Mon Oct 08, 2007 1:26 am
Location: France, Paris area

Re: Dialog box accelerator

Post by B Marcelly »

Hi,
Just put a tilde character ( ~ ) at left of the character you want as accelerator.

______
Bernard
Post Reply