Previous Document Next Document

Object Model Reference : Classes : P : Palette : Properties : Palette.Type


Palette.Type

Property Type As cdrPaletteType

Description

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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.