Difference between revisions of "Documentation/DevGuide/Basic/Image Control"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m
 
(4 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/Basic/Check Box
 
|NextPage=Documentation/DevGuide/Basic/Check Box
 
}}
 
}}
{{DISPLAYTITLE:Image Control}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Image Control}}
 
If the user wants to display an image without the button functionality, the image control <idl>com.sun.star.awt.UnoControlImageControl</idl> is selected. The location of the graphic for the command button is set by the <code>ImageURL</code> property. Usually, the size of the image does not match the size of the control, therefore the image control automatically scales the image to the size of the control by setting the <code>ScaleImage</code> property to <code>True</code>.
 
If the user wants to display an image without the button functionality, the image control <idl>com.sun.star.awt.UnoControlImageControl</idl> is selected. The location of the graphic for the command button is set by the <code>ImageURL</code> property. Usually, the size of the image does not match the size of the control, therefore the image control automatically scales the image to the size of the control by setting the <code>ScaleImage</code> property to <code>True</code>.
 
+
<syntaxhighlight lang="oobas">
 
   oImageControlModel = oDialog.Model.ImageControl1
 
   oImageControlModel = oDialog.Model.ImageControl1
 
   oImageControlModel.ImageURL =  
 
   oImageControlModel.ImageURL =  
 
       "file:///D:/Office60/share/gallery/photos/beach.jpg"
 
       "file:///D:/Office60/share/gallery/photos/beach.jpg"
 
   oImageControlModel.ScaleImage = True
 
   oImageControlModel.ScaleImage = True
 +
</syntaxhighlight>
 +
{{PDL1}}
  
{{PDL1}}
+
[[Category:Documentation/Developer's Guide/Basic and Dialogs]]
[[Category: Basic and Dialogs]]
+

Latest revision as of 21:25, 20 December 2020



If the user wants to display an image without the button functionality, the image control com.sun.star.awt.UnoControlImageControl is selected. The location of the graphic for the command button is set by the ImageURL property. Usually, the size of the image does not match the size of the control, therefore the image control automatically scales the image to the size of the control by setting the ScaleImage property to True.

  oImageControlModel = oDialog.Model.ImageControl1
  oImageControlModel.ImageURL = 
      "file:///D:/Office60/share/gallery/photos/beach.jpg"
  oImageControlModel.ScaleImage = True
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages