ImageEn, unit iexColorButton

TIEColorButton.OnGetPalette

TIEColorButton.OnGetPalette


Declaration

property OnGetPalette: TGetPaletteEvent;


Description

Occurs before the display of the color selection dialog. If a palette is specified (i.e. NumCol > 0 ) the user can only select from the specified palette. If no palette is specified, or event is not used, the user can select from the full color palette (using the standard VCL color dialog).


Examples

procedure TfrmMain.OnGetPalette(Sender: TObject; var Palette: array of TRGB; var NumCol: integer);
begin
  // Only allow selection of colors in the image
  Palette := ImageEnView1.IO.Params.ColorMap;
  NumCol  := ImageEnView1.IO.Params.ColorMapCount;
end;