Difference between revisions of "Documentation/DevGuide/Basic/Currency Field"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
Line 9: Line 9:
 
  {{DISPLAYTITLE:Currency Field}}
 
  {{DISPLAYTITLE:Currency Field}}
 
The currency field control <idl>com.sun.star.awt.UnoControlCurrencyField</idl> is used for entering and displaying currency values. In addition to the currency value, a currency symbol is displayed, that is set by the <code>CurrencySymbol</code> property. If the <code>PrependCurrencySymbol</code> property is set to <code>True</code>, the currency symbol is displayed in front of the currency value.
 
The currency field control <idl>com.sun.star.awt.UnoControlCurrencyField</idl> is used for entering and displaying currency values. In addition to the currency value, a currency symbol is displayed, that is set by the <code>CurrencySymbol</code> property. If the <code>PrependCurrencySymbol</code> property is set to <code>True</code>, the currency symbol is displayed in front of the currency value.
<source lang="oobas">
+
<syntaxhighlight lang="oobas">
 
   oCurrencyFieldModel = oDialog.Model.CurrencyField1
 
   oCurrencyFieldModel = oDialog.Model.CurrencyField1
 
   oCurrencyFieldModel.Value = 500.00
 
   oCurrencyFieldModel.Value = 500.00
 
   oCurrencyFieldModel.CurrencySymbol = "€"
 
   oCurrencyFieldModel.CurrencySymbol = "€"
 
   oCurrencyFieldModel.PrependCurrencySymbol = True
 
   oCurrencyFieldModel.PrependCurrencySymbol = True
</source>
+
</syntaxhighlight>
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/Developer's Guide/Basic and Dialogs]]
 
[[Category:Documentation/Developer's Guide/Basic and Dialogs]]

Latest revision as of 13:03, 21 December 2020



The currency field control com.sun.star.awt.UnoControlCurrencyField is used for entering and displaying currency values. In addition to the currency value, a currency symbol is displayed, that is set by the CurrencySymbol property. If the PrependCurrencySymbol property is set to True, the currency symbol is displayed in front of the currency value.

  oCurrencyFieldModel = oDialog.Model.CurrencyField1
  oCurrencyFieldModel.Value = 500.00
  oCurrencyFieldModel.CurrencySymbol = "€"
  oCurrencyFieldModel.PrependCurrencySymbol = True
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages