home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue26 / sdrop14 / SDROP14.ZIP / SDropDemo2.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-09-03  |  1.2 KB  |  48 lines

  1. unit SDropDemo2;
  2. {$A+,B-,G+,H+,O+,J-,T+,U-,V+,W-,X+} //Set up compiler
  3. {$D-,L-,Q-,R-,Y-} //Comment out to debug
  4.  
  5. interface
  6.  
  7. uses
  8.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  9.   StdCtrls, ExtCtrls;
  10.  
  11. type
  12.   TfrmDropEdit = class(TForm)
  13.     Panel1: TPanel;
  14.     rgColor: TRadioGroup;
  15.     Label1: TLabel;
  16.     procedure rgColorClick(Sender: TObject);
  17.   private
  18.     { Private declarations }
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   frmDropEdit: TfrmDropEdit;
  25.  
  26. implementation
  27.  
  28. uses SDropDemo1;
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TfrmDropEdit.rgColorClick(Sender: TObject);
  33. begin
  34.   With frmDropDemo.SDropEdit1 do begin
  35.     Case rgColor.ItemIndex of
  36.       0: begin Color:=clRed; Font.Color:=clWhite; Text:='Red'; end;
  37.       1: begin Color:=clGreen; Font.Color:=clWhite; Text:='Green'; end;
  38.       2: begin Color:=clBlue; Font.Color:=clWhite; Text:='Blue'; end;
  39.       3: begin Color:=clFuchsia; Font.Color:=clBlack; Text:='Purple'; end;
  40.       4: begin Color:=clYellow; Font.Color:=clBlack; Text:='Yellow'; end;
  41.       5: begin Color:=$000080FF; Font.Color:=clBlack; Text:='Orange'; end;
  42.     end; // Case
  43.     CloseForm; end;
  44. end;
  45.  
  46.  
  47. end.
  48.