https://issues.apache.org/ooo/show_bug.cgi?id=123516
--- Comment #8 from Ariel Constenla-Haile <[email protected]> --- The second draft hides the dialog's implementation details by using two interfaces: css::ui::dialogs::XControlInformation; css::ui::dialogs::XControlAccess; Showing a color picker, displaying the original color, can be done with the following Basic code: Sub ColorPicker_PreviousColor Dim oWin as Object oWin = ThisComponent.getCurrentController().getFrame().getContainerWindow() Dim oDlg oDlg = com.sun.star.ui.dialogs.ColorPicker.create(oWin, RGB(255,0,0)) oDlg.setTitle("Color Picker Demo") oDlg.setControlProperty("PreviousColor","Visible",True) Dim nResult% nResult = oDlg.execute() If nResult = com.sun.star.ui.dialogs.ExecutableDialogResults.OK Then Dim nColor as Long nColor = oDlg.SelectedColor MsgBox "Selected color: RGB(" & _ CStr(Red(nColor)) & "," & _ CStr(Green(nColor)) & "," & _ CStr(Blue(nColor)) & ")" End If End Sub Instead of using strings ("PreviousColor","Visible"), it would be better to use constants, like the FilePicker does (XFilePickerControlAccess with CommonFilePickerElementIds, ExtendedFilePickerElementIds). But for now the color picker only exposes one control (original color preview) with one property (visible). -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes.
