Class TDlgMain (unit Main) |
Inherits from
TForm
procedure FormClose(Sender: TObject; var Action: TCloseAction);
Finally, open the table
procedure FormCreate(Sender: TObject);
procedure PopColClick(Sender: TObject);
PopColClick toggles the checkmark for the popup menu item
who called it.
procedure PopupStandardClick(Sender: TObject);
PopupStandardClick resets the grid column layout to the state
that has been designed by the programmer.
procedure PopColCheck;
Private declarations
PopColCheck sets a checkmark for those items in the popumenu
that correspond to a visible grid column.
DSEmp : TDataSource;
MainGrid : TDBGrid;
N1 : TMenuItem;
PanelClient : TPanel;
PopColEmpNo : TMenuItem;
PopColFirstName : TMenuItem;
PopColHireDate : TMenuItem;
PopColLastName : TMenuItem;
PopColPhoneExt : TMenuItem;
PopColSalary : TMenuItem;
PopMenu : TPopupMenu;
PopupStandard : TMenuItem;
TblEmp : TTable;
TblEmpEmpNo : TIntegerField;
TblEmpFirstName : TStringField;
TblEmpHireDate : TDateTimeField;
TblEmpLastName : TStringField;
TblEmpPhoneExt : TStringField;
TblEmpSalary : TFloatField;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
Finally, open the table
procedure FormCreate(Sender: TObject);
procedure PopColClick(Sender: TObject);
PopColClick toggles the checkmark for the popup menu item
who called it. In addition, the visibility of the corresponding
grid column is then set according to the stae of the checkmark.
procedure PopupStandardClick(Sender: TObject);
PopupStandardClick resets the grid column layout to the state
that has been designed by the programmer.
It restores the defautl values that were writen during
form creation, and then sets the check marks for the popup
items related to the grid columns accordingly by calling
the PopColCheck procedure
procedure PopColCheck;
Private declarations
PopColCheck sets a checkmark for those items in the popumenu
that correspond to a visible grid column.
DSEmp : TDataSource;
MainGrid : TDBGrid;
N1 : TMenuItem;
PanelClient : TPanel;
PopColEmpNo : TMenuItem;
PopColFirstName : TMenuItem;
PopColHireDate : TMenuItem;
PopColLastName : TMenuItem;
PopColPhoneExt : TMenuItem;
PopColSalary : TMenuItem;
PopMenu : TPopupMenu;
PopupStandard : TMenuItem;
TblEmp : TTable;
TblEmpEmpNo : TIntegerField;
TblEmpFirstName : TStringField;
TblEmpHireDate : TDateTimeField;
TblEmpLastName : TStringField;
TblEmpPhoneExt : TStringField;
TblEmpSalary : TFloatField;