Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

Help IDs in OpenOffice.org

In OpenOffice.org, ever user interface element (a dialog control, a menu item, whatever), needs to have a unique help id. To some extent, you as the developer are responsible for ensuring this ...

Content

Why your controls need help ids
Dialogs, Tab pages, and the like

Resources

Programmatic element creation
Menus and toolbars
Manually declaring help ids

Why your controls need help ids

Dialogs, Tab pages, and the like

Resources

If you declare your dialogs (which from now on will be a placeholder for Dialog, ModalDialog, TabPage, and other such "control containers") using resources, some things are done automatically. For instance, let's consider the following resource:

    ModalDialog RID_DLG_IDENTIFIER
{
// ... some stuff
Text = "the dialog";

FixedText FT_LABEL
{
// Pos/Size/etc. ...
Text = "the label";
};
Control CTL_CONTROL
{
// Pos/Size/etc. ...
};
OKButton PB_OK
{
// Pos/Size/etc. ...
};
CancelButton PB_CANCEL
{
// Pos/Size/etc. ...
};
};

Here, you don't have to care about the fixed text, and the buttons (and even the dialog itself). Simply forget about them: HelpIDs will be generated automatically for them, both for usage with the help system, and for usage with the QA test tool.

However, you need to care for the Control. For this "generic" type (as opposed to the concrete types you usually encounter), you need to manually ensure that it gets a help id, and that this help id is usable for others. See " Manually declaring help ids" below for how you do this.

Programmatic element creation

If you create your UI elements programmatically (e.g. within the C++ source code at runtime), then you also need to declare help ids manually.

Menus and toolbars

(Yet to come)

Manually declaring help ids

If you have an UI element which needs a manually declared help id, the following is necessary:

Last modified: $Date: 2004/09/01 12:14:46 $

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.