| Class TPaletteForm (unit ViewForm) |
TForm
Simple program that displays the current system palette. Copyright © 1998 Tempest Software, Inc.
| Constructors |
| Functions |
procedure ColorPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure ColorPanelPaint(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormResize(Sender: TObject);
function GetPalette: HPalette;| Properties |
property NumColors : Word
property Palette : HPalette| Events |
| Variables |
ColorPanel : TPaintBox;
ErrorLabel : TLabel;
StatusBar : TStatusBar;
fNumColors : Word;
fPalette : HPalette;| Constructors |
| Functions |
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.
| Properties |
property NumColors : Word
property Palette : HPalette| Events |
| Variables |
ColorPanel : TPaintBox;
ErrorLabel : TLabel;
StatusBar : TStatusBar;
fNumColors : Word;
fPalette : HPalette;