Common Workflow to add Controls

From Apache OpenOffice Wiki
Jump to: navigation, search



For any existing dialog controls there is a common workflow to follow to insert a control into a dialog:

  1. Instantiate the control model at the MultiServiceFactory of the dialog.
  2. Set the Properties at the control model (for performance reasons, use the interface com.sun.star.beans.XMultiPropertySet).
  3. Insert the control model at the control model container of the dialog model. In our coding examples we refer to this container by the public object variable m_xDlgModelNameContainer created in the code example of Instantiation of a Dialog
  4. Query the control from the dialog control container by referencing the name (that you have previously assigned to the control model). Note: According to the MVC paradigm there is no way to retrieve the control from the model.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages