Object Model Reference : Classes : P : Palette : Properties : Palette.Type |
Property Type As cdrPaletteType
Member of Palette
The Type property returns whether a palette is a custom palette (for example, a CorelDRAW palette or any user-created palette) or a fixed palette (for example, PANTONE, Netscape, TOYO, or FOCOLTONE).
The Type property returns a read-only value, cdrPaletteType.
The following VBA example displays the total number of palettes that are open, as well as the number of fixed and custom palettes.
Sub Test() |
Dim fx As Long, cs As Long |
Dim pal As Palette |
fx = 0 |
cs = 0 |
For Each pal In Palettes |
Select Case pal.Type |
Case cdrFixedPalette |
fx = fx + 1 |
Case cdrCustomPalette |
cs = cs + 1 |
End Select |
Next pal |
MsgBox "Total palettes open: " & Palettes.Count & vbCr & _ |
"Fixed palettes: " & fx & vbCr & _ |
"Custom palettes: " & cs |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.