Difference between revisions of "Documentation/DevGuide/Basic/Dialog Properties"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
m
 
Line 9: Line 9:
 
  {{DISPLAYTITLE:Dialog Properties}}
 
  {{DISPLAYTITLE:Dialog Properties}}
 
It is possible to make some modifications before a dialog is shown. An example is to set the dialog title that is shown in the title bar of a dialog window. This can be achieved by setting the Title property at the dialog model through the <idl>com.sun.star.beans.XPropertySet</idl> interface:
 
It is possible to make some modifications before a dialog is shown. An example is to set the dialog title that is shown in the title bar of a dialog window. This can be achieved by setting the Title property at the dialog model through the <idl>com.sun.star.beans.XPropertySet</idl> interface:
 
+
<source lang="oobas">
 
   oDialogModel = oDialog.getModel()
 
   oDialogModel = oDialog.getModel()
 
   oDialogModel.setPropertyValue("Title", "My Title")
 
   oDialogModel.setPropertyValue("Title", "My Title")
 
+
</source>
 
or shorter
 
or shorter
 
+
<source lang="oobas">
 
   oDialog.Model.Title = "My Title"
 
   oDialog.Model.Title = "My Title"
 
+
</source>
 
Another approach is to use the <code>setTitle</code> method of the <idl>com.sun.star.awt.XDialog</idl> interface:
 
Another approach is to use the <code>setTitle</code> method of the <idl>com.sun.star.awt.XDialog</idl> interface:
 
+
<source lang="oobas">
 
   oDialog.setTitle("My Title")
 
   oDialog.setTitle("My Title")
 
+
</source>
 
or
 
or
 
+
<source lang="oobas">
 
   oDialog.Title = "My Title"
 
   oDialog.Title = "My Title"
 
+
</source>
 
Another property is the <code>BackgroundColor</code> property that sets a different background color for the dialog.
 
Another property is the <code>BackgroundColor</code> property that sets a different background color for the dialog.
  

Latest revision as of 09:56, 22 October 2009



It is possible to make some modifications before a dialog is shown. An example is to set the dialog title that is shown in the title bar of a dialog window. This can be achieved by setting the Title property at the dialog model through the com.sun.star.beans.XPropertySet interface:

  oDialogModel = oDialog.getModel()
  oDialogModel.setPropertyValue("Title", "My Title")

or shorter

  oDialog.Model.Title = "My Title"

Another approach is to use the setTitle method of the com.sun.star.awt.XDialog interface:

  oDialog.setTitle("My Title")

or

  oDialog.Title = "My Title"

Another property is the BackgroundColor property that sets a different background color for the dialog.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages