Click or drag to resize

DXFReaderNETControlShowPalette Method

Shows the default Palette dialog for the control.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax
public AciColor ShowPalette(
	AciColor Color,
	bool SelectLayerColor = false
)

Parameters

Color
Type: DXFReaderNETAciColor
The initial ACI color displayed when Palette dialog is shown
SelectLayerColor (Optional)
Type: SystemBoolean
If set to true the buttons 'ByLayer' and 'ByBlock are disabled.

Return Value

Type: AciColor
The value returned corresponds to the ACI color selectd if the Ok is pressed
Remarks
See also the code sample.
Examples
It is possible to localize the dialog strings using some internal properties as shown in the samples and picture below:
[C#]
dxfReaderNETControl1.ColorPaletteDialogText = "选择颜色";
dxfReaderNETControl1.ColorPaletteDialogButtoOkText = "好";
dxfReaderNETControl1.ColorPaletteDialogButtonCancelText = "取消";
dxfReaderNETControl1.ColorPaletteDialogLabelIndexColor = "索引色";
dxfReaderNETControl1.ColorPaletteDialogLabelRGB = "红,绿,蓝";
dxfReaderNETControl1.ColorPaletteDialogLabelColor = "颜色";

dxfReaderNETControl1.DXF.CurrentColor = dxfReaderNETControl1.ShowPalette(dxfReaderNETControl1.DXF.CurrentColor);
[Visual Basic]
With DxfReaderNETControl1
   .ColorPaletteDialogText = "选择颜色"
   .ColorPaletteDialogButtoOkText = "好"
   .ColorPaletteDialogButtonCancelText = "取消"
   .ColorPaletteDialogLabelIndexColor = "索引色"
   .ColorPaletteDialogLabelRGB = "红,绿,蓝"
   .ColorPaletteDialogLabelColor = "颜色"

   .DXF.CurrentColor = .ShowPalette(.DXF.CurrentColor)
End With
See Also