Class TPaletteForm (unit ViewForm) |
Inherits from
TForm
Simple program that displays the current system palette.
Copyright © 1998 Tempest Software, Inc.
procedure ColorPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
Display the color of the pixel under the mouse.
procedure ColorPanelPaint(Sender: TObject);
Paint the form with a grid of boxes, where each box is filled with a palette color.
procedure FormCreate(Sender: TObject);
Set up the form's palette to display the system palette.
procedure FormDestroy(Sender: TObject);
Free the palette when the form closes
procedure FormResize(Sender: TObject);
Redraw the palette boxes when the form changes size
function GetPalette: HPalette;
Return the form's palette.
property NumColors : Word
property Palette : HPalette
ColorPanel : TPaintBox;
ErrorLabel : TLabel;
StatusBar : TStatusBar;
fNumColors : Word;
fPalette : HPalette;
procedure ColorPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
Display the color of the pixel under the mouse.
procedure ColorPanelPaint(Sender: TObject);
Paint the form with a grid of boxes, where each box is filled with a palette color. To make it easier to see the colors, leave a small margin around each box and around the edge of the form.
procedure FormCreate(Sender: TObject);
Set up the form's palette to display the system palette.
procedure FormDestroy(Sender: TObject);
Free the palette when the form closes
procedure FormResize(Sender: TObject);
Redraw the palette boxes when the form changes size
function GetPalette: HPalette;
Return the form's palette.
property NumColors : Word
property Palette : HPalette
ColorPanel : TPaintBox;
ErrorLabel : TLabel;
StatusBar : TStatusBar;
fNumColors : Word;
fPalette : HPalette;