home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sibylft1.zip / DOC.DAT / DOC / SPCC / DUALLIST.PAS < prev    next >
Pascal/Delphi Source File  |  1997-04-07  |  2KB  |  78 lines

  1. UNIT DualList;
  2.  
  3. INTERFACE
  4.  
  5. USES
  6.   SysUtils,Classes,Forms,Buttons,StdCtrls;
  7.  
  8. TYPE
  9.   TDualList=CLASS(TControl)
  10.     PRIVATE
  11.        FSrcLabel:TLabel;
  12.        FDstLabel:TLabel;
  13.        FSrcList:TListBox;
  14.        FDstList:TListBox;
  15.        FAddBtn:TSpeedButton;
  16.        FAddAllBtn:TSpeedButton;
  17.        FDelBtn:TSpeedButton;
  18.        FDelAllBtn:TSpeedButton;
  19.        FOnChange:TNotifyEvent;
  20.        FUNCTION GetSrcName:STRING;
  21.        PROCEDURE SetSrcName(Value:STRING);
  22.        FUNCTION GetSrcItems:TStrings;
  23.        PROCEDURE SetSrcItems(Value:TStrings);
  24.        FUNCTION GetDstName:STRING;
  25.        PROCEDURE SetDstName(Value:STRING);
  26.        FUNCTION GetDstItems:TStrings;
  27.        PROCEDURE SetDstItems(Value:TStrings);
  28.        PROCEDURE UpdateButtons;
  29.        PROCEDURE EvItemSelect(Sender:TObject;Index:LONGINT);
  30.        PROCEDURE EvAdd(Sender:TObject);
  31.        PROCEDURE EvAddAll(Sender:TObject);
  32.        PROCEDURE EvDel(Sender:TObject);
  33.        PROCEDURE EvDelAll(Sender:TObject);
  34.     PROTECTED
  35.        PROCEDURE SetupComponent;OVERRIDE;
  36.        PROCEDURE SetupShow;OVERRIDE;
  37.        PROCEDURE Resize;OVERRIDE;
  38.        PROCEDURE SetFocus;OVERRIDE;
  39.        PROCEDURE FontChange;OVERRIDE;
  40.        PROPERTY Hint;
  41.     PUBLIC
  42.        FUNCTION WriteSCUResource(Stream:TResourceStream):BOOLEAN;OVERRIDE;
  43.        PROCEDURE ReadSCUResource(CONST ResName:TResourceName;VAR Data;DataLen:LONGINT);OVERRIDE;
  44.        PROPERTY SrcListBox:TListBox read FSrcList;
  45.        PROPERTY DstListBox:TListBox read FDstList;
  46.        PROPERTY XAlign;
  47.        PROPERTY XStretch;
  48.        PROPERTY YAlign;
  49.        PROPERTY YStretch;
  50.     PUBLISHED
  51.        PROPERTY Align;
  52.        PROPERTY PenColor;
  53.        PROPERTY DstItems:TStrings read GetDstItems write SetDstItems;
  54.        PROPERTY DstName:STRING read GetDstName write SetDstName;
  55.        PROPERTY Enabled;
  56.        PROPERTY Font;
  57.        PROPERTY ParentPenColor;
  58.        PROPERTY ParentFont;
  59.        PROPERTY SrcItems:TStrings read GetSrcItems write SetSrcItems;
  60.        PROPERTY SrcName:STRING read GetSrcName write SetSrcName;
  61.        PROPERTY TabOrder;
  62.        PROPERTY Visible;
  63.        PROPERTY ZOrder;
  64.  
  65.        PROPERTY OnChange:TNotifyEvent read FOnChange write FOnChange;
  66.        PROPERTY OnFontChange;
  67.        PROPERTY OnSetupShow;
  68.   END;
  69.  
  70.  
  71. FUNCTION InsertDualList(Parent:TControl;Left,Bottom,Width,Height:LONGINT;
  72.   CONST SrcName,DstName:STRING):TDualList;
  73.  
  74.  
  75. IMPLEMENTATION
  76.  
  77.  
  78.