Top > OOoBasic > Generic > ColorPicker

カラーピッカー Edit

AOO 3.4 からカラーピッカーが API から利用できます。

Sub ColorPicker
 Dim aArgs(1) As New com.sun.star.beans.PropertyValue
 aArgs(0).Name = "Color"
 aArgs(0).Value = RGB(255, 128, 0) ' initial value
 aArgs(1).Name = "Mode"
 aArgs(1).Value = 2 ' unknown
 
 dlg = CreateUnoService("com.sun.star.ui.dialogs.ColorPicker")
 dlg.setTitle("Color") ' title
 dlg.setPropertyValues(aArgs)
 dlg.execute()
 ' get color value
 v = dlg.getPropertyValues(Array("Color"))
 msgbox v(0).Value
End Sub

Reload   New Lower page making Edit Freeze Diff Upload Copy Rename   Front page List of pages Search Recent changes Backup   Help   RSS of recent changes