|
From: Peter T. <pe...@us...> - 2003-08-23 23:25:44
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/JvColorButton
In directory sc8-pr-cvs1:/tmp/cvs-serv4702/JVCL3/examples/JvColorButton
Added Files:
ColorButtonDemo.dof ColorButtonDemo.dpr ColorButtonDemo.res
Main.dfm Main.pas
Log Message:
- Copied jvcl/devtools and jvcl/examples dev/JVCL3
- Copied JVCLConvert *.dat files to dev/JVCL3/converter
--- NEW FILE: ColorButtonDemo.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: ColorButtonDemo.dpr ---
program ColorButtonDemo;
uses
Forms,
Main in 'Main.pas' {Form2};
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
--- NEW FILE: ColorButtonDemo.res ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: Main.dfm ---
object Form2: TForm2
Left = 349
Top = 137
BorderStyle = bsDialog
Caption = 'ColorButton'
ClientHeight = 119
ClientWidth = 198
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
PixelsPerInch = 96
TextHeight = 13
object ColorButton1: TJvColorButton
Left = 64
Top = 24
Width = 42
Height = 21
OtherCaption = '&Other...'
Options = [cdPreventFullOpen, cdShowHelp]
Color = clNavy
end
end
--- NEW FILE: Main.pas ---
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, JvColorBox, Menus, Buttons,ExtCtrls, JvColorBtn,
JvComponent;
type
TForm2 = class(TForm)
ColorButton1: TJvColorButton;
procedure ColorBox1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ColorBox1ColorClick(Sender: TObject; Button: TMouseButton;
Color: TColor);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses JvColorForm;
{$R *.DFM}
procedure TForm2.ColorBox1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = mbLeft then
Caption := Caption + ' Left '
else
Caption := Caption + ' Right '
end;
procedure TForm2.ColorBox1ColorClick(Sender: TObject; Button: TMouseButton;
Color: TColor);
begin
Caption := ColorToString(Color);
end;
end.
|