-
Notifications
You must be signed in to change notification settings - Fork 0
/
NDBGridDsgn.cpp
67 lines (55 loc) · 2.2 KB
/
NDBGridDsgn.cpp
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
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "NDBGrid.h"
#include "NDBGridDsgn.h"
#include "ComponentEditors.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//
//---------------------------------------------------------------------------
static inline void ValidCtrCheck(TNDBGrid *)
{
new TNDBGrid(NULL);
}
//---------------------------------------------------------------------------
namespace Ndbgriddsgn
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = { __classid( TNDBGrid ) };
RegisterComponents( "Data Controls", classes, 0 );
RegisterComponentEditor(
__classid( TNDBGrid ), __classid( TNDBGridComponentEditor )
);
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
__fastcall TNDBGridComponentEditor::TNDBGridComponentEditor(
Classes::TComponent* AComponent,
Designintf::_di_IDesigner ADesigner )
: TComponentEditor( AComponent, ADesigner )
{
}
//---------------------------------------------------------------------------
int __fastcall TNDBGridComponentEditor::GetVerbCount()
{
return 1;
}
//---------------------------------------------------------------------------
UnicodeString __fastcall TNDBGridComponentEditor::GetVerb( int Index )
{
return _T( "Co&lumns Editor..." );
}
//---------------------------------------------------------------------------
void __fastcall TNDBGridComponentEditor::ExecuteVerb( int Index )
{
EditPropertyDlg( Component, TEXT( "Columns" ), Designer );
}
//---------------------------------------------------------------------------