-
Notifications
You must be signed in to change notification settings - Fork 0
/
CascadedList.h
66 lines (60 loc) · 2.42 KB
/
CascadedList.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//---------------------------------------------------------------------------
#ifndef CascadedListH
#define CascadedListH
//---------------------------------------------------------------------------
#include <stdlib.h>
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
typedef enum {
ORIENT_VERTICAL=0, ORIENT_HORIZONTAL=1
} TOrientation;
//---------------------------------------------------------------------------
class PACKAGE TCascadedList : public TCustomPanel
{
private:
TNotifyEvent FOnChange;
AnsiString *FItemCaption;
AnsiString *FListCaption;
AnsiString *FItem;
AnsiString *FListSelection;
TStringList *FList;
TOrientation FOrientation;
TLabel *Name1;
TLabel *Name2;
TComboBox *List1;
TComboBox *List2;
void __fastcall List1Change(TObject* Sender);
void __fastcall List2Change(TObject* Sender);
protected:
virtual void __fastcall Layout(void);
virtual void __fastcall Paint(void);
void __fastcall SetOrientation(TOrientation o);
AnsiString __fastcall GetItemCaption();
void __fastcall SetItemCaption(AnsiString c);
AnsiString __fastcall GetListCaption();
void __fastcall SetListCaption(AnsiString c);
AnsiString __fastcall GetItem();
void __fastcall SetItem(AnsiString i);
TStringList* __fastcall GetList();
void __fastcall SetList(TStringList *i);
AnsiString __fastcall GetListSelection();
public:
__fastcall TCascadedList(TComponent* Owner);
__published:
__property TOrientation Orientation = {read=FOrientation, write=SetOrientation,default=ORIENT_VERTICAL};
__property AnsiString ItemCaption = {read=GetItemCaption,write=SetItemCaption};
__property AnsiString ListCaption = {read=GetListCaption,write=SetListCaption};
__property AnsiString Item = {read=GetItem,write=SetItem};
__property AnsiString ListSelection = {read=GetListSelection};
__property TStringList *List = {read=GetList,write=SetList};
__property Height;
__property Width;
__property Font;
__property TNotifyEvent OnChange = {read=FOnChange,write=FOnChange};
};
//---------------------------------------------------------------------------
#endif