Dialog box accelerator

Creating a macro - Writing a Script - Using the API

Dialog box accelerator

Postby Newent » Mon Feb 04, 2008 2:30 pm

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
Newent
 
Posts: 6
Joined: Mon Feb 04, 2008 2:06 pm

Re: Dialog box accelerator

Postby Villeroy » Mon Feb 04, 2008 3:08 pm

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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26395
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dialog box accelerator

Postby B Marcelly » Mon Feb 04, 2008 11:19 pm

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

______
Bernard
B Marcelly
Volunteer
 
Posts: 1160
Joined: Mon Oct 08, 2007 1:26 am
Location: France, Paris area


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 5 guests