|
VCL Form, B_ook
Create VCL Form - B_ook
Classes used in this Form: Windows,
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,
Borland.Vcl.StdCtrls,
Borland.Vcl.ExtCtrls,
System.ComponentModel;
Type of Controls
used in this Form:
Label, Edit, Image, Memo, Button, Listbox, Combobox and PageControl
- On the File menu ,
click New. and then click VCL Form. New File
name Unit1.pas appears. (Form name - Form1)
- On the View menu ,
click Object Inspector. In Object Inspector
modify the following ...
1-
Unit1.pas
|
Old |
New |
File Name: |
Unit1.pas |
B_ook.pas |
|
2. Form1
|
Old |
New |
Caption: Name: Icon: Menu: Border
Icons
biMaximize: Position: Height: Width: |
Form1 Form1 None (none)
True poDefaultPosOnly 240 347 |
Book Book TIcon (none)
False poDesKtopcenter
444 644 |
|
Save this
file ... On the
File menu , click Save
The codes
corresponding to the VCL Form created by system
.... File name - Unit1.pas
unit
Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.nfm}
end. | |
1. |
The design, B_ook. |
|
|
2. |
From the Tool palette add these
controls .. (From the View menu, click Tool
palette) |
|
- Add the TImage
control - Image1, Object
inspector:
Name: Picture: Center: Visible: |
Image1 (TBitmap) True True |
|
- Add the TImage
control - Image2, Object
inspector:
Name: Picture: Center: Visible: |
Image2 (TBitmap) True True |
|
- Add the TPanel control - , Object
inspector:
- Add the TLabel
control - lbbook, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbbook Book Left |
|
- Add the TLabel
control - lbTitle, Object
inspector
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbTitle Title Left |
|
:
- Add the TLabel
control - lbChapter, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbChapter Chapter Left |
|
- Add the TLabel
control - lbVerse, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbVerse Verse Left | |
- Add the TEdit control - edbook, Object
inspector:
Name: color:
Border Style: |
edbook clBtnFace
bsNone |
|
- Add the TEdit control - edtitle, Object
inspector:
Name: color:
Border Style: |
edtitle clBtnFace
bsNone |
|
- Add the TEdit control - edchapter, Object
inspector:
Name: color:
Border Style: |
edchapter clBtnFace
bsNone | |
- Add the TEdit control - edverse, Object
inspector::
Name: color:
Border Style: |
edverse clBtnFace
bsNone | |
- Add the TMemo control
- MTextdata, Object
inspector:
Border Style: Name:
Color: |
bsSingle MTextdata
clWindows | |
- Add the TEdit control - edrec, Object
inspector:
Name: color:
Border Style: |
edrec clBtnFace
bsNone |
|
- Add the TButton
control -
btnfirst, Object
inspector
Caption:
Name: |
F
btnfirst |
|
- Add the TButton
control -
btnprev, Object
inspector
- Add the TButton
control -
btnnext, Object
inspector
- Add the TButton
control -
btnlast, Object
inspector
- Add the TButton
control -
btnclose, Object
inspector
Caption:
Name: |
Close
btnclose |
|
- Add the TPageControl
control - PageControl1, Object
inspector
PageControl
is a set of pages used to make a multiple page dialog
box.
PageControl
displays multiple overlapping pages that are TTabSheet
objects
Name: ActivePage:
Style: |
PageControl1 Tabword
tstable | |
To add a new page to a
PageControl control at
design time, right-click the
PageControl control
and choose New Page (TabSheet)
1. |
Add the TTabSheet
control -
Tabword, Object
inspector
|
|
Caption:
Imageindex:
Name: |
Search by Word 0
Tabword |
|
|
|
|
2. |
Add the TTabSheet
control -
Tabaddress, Object
inspector
|
|
Caption:
Imageindex:
Name: |
Search by Address 1
Tabaddress |
|
|
|
|
- Add the TLabel control - Label1, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic Label1 Type in the word
to search for: Left |
|
- Add the TLabel control - Label2, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic Label2 Book
BookTitle Chapter
Verse Left |
|
- Add the TEdit control - edword, Object
inspector:
Name: color:
Border Style: |
edword clWindows
bsSingle |
|
- Add the TEdit control - edinfo, Object
inspector:
Name: color:
Border Style: |
edinfo clBtnFace
bsNone |
|
- Add the TButton control - btndisplay, Object
inspector:
Caption:
Name: |
Display
btndisplay |
|
- Add the TListbox control - ListBox1, Object
inspector:
Name: Font: |
ListBox1 Ms Serif, 12pt, style=Normal | |
- Add the TLabel
control -lbbook1, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbbook1 Book Left |
|
- Add the TLabel
control - lbtitle1, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbtitle1 Title Left |
|
- Add the TLabel
control - lbchapter1, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbchapter1 chapter Left |
|
- Add the TLabel
control - lbverse1, Object
inspector:
Font: Name: Text: Alignment: |
Times New Roman, 9.75pt,
style=Bold, Italic lbverse1 Verse Left |
|
- Add the TComboBox
control -
cmbbook, Object
inspector:
- Add the TComboBox
control -
cmbtitle, Object
inspector:
- Add the TComboBox
control -
cmbchapter, Object
inspector:
- Add the TComboBox
control -
cmbverse, Object
inspector:
| | |
|
The Event and
codes in Delphi ... B_ook
The text Code is
Navy color, corresponding to code create by
system The
text
Code
is red color, corresponding to the code corresponding to the
events added The text Code is Navy
color,
corresponding to the other form to be
add
|
|
unit B_ook;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms,
Dialogs, Borland.Vcl.StdCtrls, System.ComponentModel,
Borland.Vcl.ExtCtrls, Borland.Vcl.ComCtrls;
type
TBook = class(TForm)
Image1: TImage;
Image2: TImage;
btnfirst: TButton;
btnprev: TButton;
btnnext: TButton;
btnlast: TButton;
Panel1: TPanel;
btnclose: TButton;
lbbook: TLabel;
lbChapter: TLabel;
lbVerse: TLabel;
lbTitle: TLabel;
edbook: TEdit;
edchapter: TEdit;
edtitle: TEdit;
edverse: TEdit;
Mtextdata: TMemo;
edrec: TEdit;
PageControl1: TPageControl;
Tabword: TTabSheet;
Tabaddress: TTabSheet;
lbbook1: TLabel;
lbtitle1: TLabel;
lbchapter1: TLabel;
lbverse1: TLabel;
edword: TEdit;
btndisplay: TButton;
Label1: TLabel;
edinfo: TEdit;
cmbbook: TComboBox;
cmbtitle: TComboBox;
cmbchapter: TComboBox;
cmbverse: TComboBox;
ListBox1: TListBox;
Label2: TLabel;
Label3: TLabel;
procedure FormActivate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action:
TCloseAction);
procedure btncloseClick(Sender: TObject);
procedure btnfirstClick(Sender: TObject);
procedure btnprevClick(Sender: TObject);
procedure btnnextClick(Sender: TObject);
procedure btnlastClick(Sender: TObject);
procedure edwordKeyPress(Sender: TObject; var Key: Char);
procedure btndisplayClick(Sender: TObject);
procedure cmbbookChange(Sender: TObject);
procedure cmbtitleChange(Sender: TObject);
procedure cmbchapterChange(Sender: TObject);
procedure cmbverseChange(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure PageControl1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure SetBookValues(vrec : Integer);
procedure Setclose;
end;
var
Book: TBook;
implementation
uses
Mainform, App_DMod;
{$R *.nfm}
var
firstrec: Integer;
lastrec: Integer;
vrecno: Integer;
vlen1 : Integer;
// ArBook array, stores absolute record position (recno)
Book field where Chapter field = 001 and Verse field = 001
// ArTitle array, stores absolute record position (recno)
Title field where Chapter field = 001 and Verse field =
001
// ArChapter array, stores absolute record position (recno)
Book field of the book corresponding and Verse field = 001
// ArVerse array, stores absolute record position (recno)
Verse field of the book and chapter corresponding
// Arlist array, stores absolute record position (recno)
corresponding to the item searching
ArBook : array of Integer;
ArTitle : array of Integer;
ArChapter : array of Integer;
ArVerse : array of Integer;
ArList : array of Integer;
procedure TBook.FormActivate(Sender: TObject);
var
vrecno1 : Integer;
ii : integer;
begin
// 4 = Max number of Books in Bibletable of KJV2002.mdb
SetLength(ArBook, 4);
SetLength(ArTitle, 4);
// Load Images ...
self.Image1.Picture.LoadFromFile(Main_Form.DataDirectory +
'forum.bmp');
self.Image2.Picture.LoadFromFile(Main_Form.DataDirectory +
'Christus-th.bmp');
// StatusBar Panel N1 = Message
Mainform.Main_Form.StatusBar1.Panels.Items[0].Text :=
'Ready ...';
AppDMod.Database1.Open;
AppDMod.Table2.Active := True;
// Set Max lenght of BibleTable field
AppDMod.Table2.First;
AppDMod.Table2.MoveBy(2);
ii := 0;
while not AppDMod.Table2.Eof do
begin
//where Chapter field = '001' and Verse field = '001'
if (AppDMod.Table2.Fields.Fields[3].Value = '001') and
(AppDMod.Table2.Fields.Fields[4].Value = '001') then
begin
if (ii = 0) then
vlen1 := Length(AppDMod.Table2.Fields.Fields[2].Value)
else if (Length(AppDMod.Table2.Fields.Fields[2].Value) >
vlen1) then
vlen1 := Length(AppDMod.Table2.Fields.Fields[2].Value);
ii := ii + 1;
end;
AppDMod.Table2.Next;
end;
// First & Last record Position
firstrec := 2;
lastrec := (AppDMod.Table2.RecordCount -1);
self.CmbBook.Items.Clear;
self.CmbTitle.Items.Clear;
try
AppDMod.Table2.DisableControls;
// Values, combo and ...
AppDMod.Table2.First;
AppDMod.Table2.MoveBy(2);
vrecno := firstrec;
vrecno1 := firstrec;
SetBookValues(vrecno);
ii := 0;
while not AppDMod.Table2.Eof do
begin
//where Chapter field = '001' and Verse field = '001'
if (AppDMod.Table2.Fields.Fields[3].Value = '001') and
(AppDMod.Table2.Fields.Fields[4].Value = '001') then
begin
// cmbbook stores the orders of all books.
// cmbtitle stores the titles of books
self.cmbbook.Items.Add(AppDMod.Table2.Fields.Fields[1].Value);
self.cmbtitle.Items.Add
(AppDMod.Table2.Fields.Fields[2].Value);
ArBook[ii] := vrecno1;
ArTitle[ii] := vrecno1;
ii := ii + 1;
end;
vrecno1 := vrecno1 + 1;
AppDMod.Table2.Next;
end;
finally
AppDMod.Table2.EnableControls;
end;
self.CmbBook.Text := 'Select';
self.CmbTitle.Text := 'Select';
self.cmbchapter.Text := 'no Select';
self.cmbverse.Text := 'no Select';
self.Tabword.CanFocus;
self.Visible := true;
end;
procedure TBook.FormClose(Sender: TObject; var Action:
TCloseAction);
begin
// Book Form, Close, ...
Setclose;
end;
procedure TBook.btncloseClick(Sender: TObject);
begin
// Book Form, Close, ...
Setclose;
end;
// Book Form, Close, ...
procedure TBook.Setclose;
begin
AppDMod.Table2.Close;
AppDMod.Table3.Close;
AppDMod.Database1.Close;
close;
// StatusBar Panel N1 = Message
Mainform.Main_Form.StatusBar1.Panels.Items[0].Text :=
'Hello ...';
end;
// Values ...
procedure TBook.SetBookValues(vrec : Integer);
begin
vrecno := vrec;
AppDMod.Table2.First;
AppDMod.Table2.MoveBy(vrec);
self.edbook.Text := AppDMod.Table2.Fields.Fields[1].Value;
self.edtitle.Text :=
AppDMod.Table2.Fields.Fields[2].Value;
self.edchapter.Text :=
AppDMod.Table2.Fields.Fields[3].Value;
self.edverse.Text :=
AppDMod.Table2.Fields.Fields[4].Value;
self.Mtextdata.Text :=
AppDMod.Table2.Fields.Fields[5].Value;
// display the current record position
self.edrec.Text := 'Rec ' + vrec.ToString;
// Navigation Controls
if (vrec = firstrec) then
begin
self.btnfirst.Enabled := False;
self.btnprev.Enabled := False;
self.btnlast.Enabled := True;
self.btnnext.Enabled := True;
exit;
end;
if (vrec = lastrec) then
begin
self.btnfirst.Enabled := True;
self.btnprev.Enabled := True;
self.btnlast.Enabled := False;
self.btnnext.Enabled := False;
exit;
end;
If (self.btnlast.Enabled = False) Or (self.btnnext.Enabled
= False) Then
begin
self.btnlast.Enabled := True;
self.btnnext.Enabled := True;
end;
If (self.btnfirst.Enabled = False) Or (self.btnprev.Enabled
= False) Then
begin
self.btnfirst.Enabled := True;
self.btnprev.Enabled := True;
end;
end;
procedure TBook.btnfirstClick(Sender: TObject);
begin
AppDMod.Table2.First;
AppDMod.Table2.MoveBy(2);
vrecno := firstrec;
SetBookValues(vrecno);
end;
procedure TBook.btnprevClick(Sender: TObject);
begin
AppDMod.Table2.Prior;
vrecno := vrecno - 1;
SetBookValues(vrecno);
end;
procedure TBook.btnnextClick(Sender: TObject);
begin
AppDMod.Table2.Next;
vrecno := vrecno + 1;
SetBookValues(vrecno);
end;
procedure TBook.btnlastClick(Sender: TObject);
begin
AppDMod.Table2.Last;
vrecno := lastrec;
SetBookValues(vrecno);
end;
// Searh by word ...
procedure TBook.edwordKeyPress(Sender: TObject; var Key:
Char);
begin
If Length(self.edword.Text) > 1 Then
self.btndisplay.Enabled := True
end;
procedure TBook.btndisplayClick(Sender: TObject);
var
fieldstr : String;
wordstr : String;
Titlefound : String;
vrecno1 : Integer;
NVar : Integer;
ii : Integer;
label pta;
label ptb;
begin
AppDMod.Table3.Active := True;
// 500 = Max number of serching items found
SetLength(Arlist, 500);
self.ListBox1.Clear;
self.edword.Enabled := false;
self.edinfo.Text := 'One moment ...';
// Convert the value of edword control to lowercase
letters
wordstr := self.edword.Text;
//lowerword := wordstr.ToLower;
// Search operation
try
AppDMod.Table3.DisableControls;
// Values, combo and ...
AppDMod.Table3.First;
AppDMod.Table3.MoveBy(2);
vrecno1 := firstrec;
NVar := 0;
ii := 0;
while not AppDMod.Table3.Eof do
begin
fieldstr := AppDMod.Table3.Fields.Fields[5].Value;
If (NVar > 499) Then goto pta;
If (Pos(wordstr.ToLower, fieldstr.ToLower) > 0) then
Begin
// Listbox stores information about Fields PadRight
PadLeft
Titlefound := AppDMod.Table3.Fields.Fields[2].Value;
if (Length(Titlefound) = vlen1) then
self.ListBox1.Items.Add(AppDMod.Table3.Fields.Fields[1].Value
+ ' ' + Titlefound + ' ' +
AppDMod.Table3.Fields.Fields[3].Value + ' ' +
AppDMod.Table3.Fields.Fields[4].Value)
else
self.ListBox1.Items.Add(AppDMod.Table3.Fields.Fields[1].Value
+ ' ' + Titlefound.PadRight(vlen1+3) + ' ' +
AppDMod.Table3.Fields.Fields[3].Value + ' ' +
AppDMod.Table3.Fields.Fields[4].Value) ;
Arlist[ii] := vrecno1;
ii := ii + 1;
NVar := NVar + 1;
end ;
vrecno1 := vrecno1 + 1;
AppDMod.Table3.Next;
end;
If NVar = 0 Then
Begin
self.edinfo.Text := 'More then ' + NVar.ToString + ' items
found. Select ...';
goto ptb;
end;
pta :
// NVar Less or equal 500
self.edinfo.Text := 'More then ' + NVar.ToString + ' items
found. Select ...';
ptb :
self.edword.text := '';
self.edword.Enabled := True;
self.btndisplay.Enabled := False;
finally
AppDMod.Table3.EnableControls;
end;
end;
procedure TBook.ListBox1Click(Sender: TObject);
begin
AppDMod.Table3.Active := True;
// Values of the Book, Title, Chapter, Verse and TextData
fields
SetBookValues( Arlist[self.ListBox1.ItemIndex]);
end;
// Searh by address ...
procedure TBook.cmbbookChange(Sender: TObject);
var
VBook : String;
vrecno1 : Integer;
ii : Integer;
jj : Integer;
begin
// 28 = Max number of Chapters of Books in Bibletable of
KJV2002.mdb
SetLength(ArChapter, 28);
// 80 = Max number of Verses of Chapters of Books in
Bibletable of KJV2002.mdb
SetLength(ArVerse, 80);
// ComboBoxese, clear
self.cmbchapter.Items.Clear;
self.cmbverse.Items.Clear;
AppDMod.Table3.Active := True;
// Book field Value
VBook := self.cmbBook.Text;
// The Cmbbook stores the orders of all books.
// The CmbBbbktitle stores the titles of books
// The Cmbchapter stores all chapters orders of the book
corresponding to the item selected
// The Cmbverse stores all verses orders of the 1st book
chapter
try
AppDMod.Table3.DisableControls;
// Values, combo and ...
AppDMod.Table3.First;
AppDMod.Table3.MoveBy(2);
vrecno1 := firstrec;
ii := 0;
jj := 0;
while not AppDMod.Table3.Eof do
begin
//where book field = VBook, Chapter field = '001' and
Verse field = '001'
if (AppDMod.Table3.Fields.Fields[1].Value = VBook) then
Begin
if (AppDMod.Table3.Fields.Fields[3].Value = '001') then
Begin
if (AppDMod.Table3.Fields.Fields[4].Value = '001') then
begin
self.cmbchapter.Items.Add(AppDMod.Table3.Fields.Fields[3].Value);
self.cmbverse.Items.Add
(AppDMod.Table3.Fields.Fields[4].Value);
ArChapter[ii] := vrecno1;
ArVerse[jj] := vrecno1;
ii := ii + 1;
jj := jj + 1;
end
else
begin
self.cmbverse.Items.Add(AppDMod.Table3.Fields.Fields[4].Value);
ArVerse[jj] := vrecno1;
jj := jj + 1;
end
end
else if (AppDMod.Table3.Fields.Fields[4].Value = '001')
then
begin
self.cmbchapter.Items.Add(AppDMod.Table3.Fields.Fields[3].Value);
ArChapter[ii] := vrecno1;
ii := ii + 1;
end
end;
vrecno1 := vrecno1 + 1;
AppDMod.Table3.Next;
end;
self.cmbTitle.ItemIndex := self.cmbbook.ItemIndex;
self.cmbchapter.ItemIndex := 0;
self.cmbverse.ItemIndex := 0;
finally
AppDMod.Table3.EnableControls;
end;
// Into the Record data boxes, displays the following
data:
// the order and title of the book,
// the 1st chapter order of the book,
// the 1st verse order of the 1st chapter
// and the contents of the 1st verse.
SetBookValues( ArBook[self.cmbbook.ItemIndex]);
end;
procedure TBook.cmbtitleChange(Sender: TObject);
var
Vtitle : String;
vrecno1 : Integer;
ii : Integer;
jj : Integer;
begin
// 28 = Max number of Chapters of Books in Bibletable of
KJV2002.mdb
SetLength(ArChapter, 28);
// 80 = Max number of Verses of Chapters of Books in
Bibletable of KJV2002.mdb
SetLength(ArVerse, 80);
// ComboBoxese, clear
self.cmbchapter.Items.Clear;
self.cmbverse.Items.Clear;
AppDMod.Table3.Active := True;
// title field Value
Vtitle := self.cmbtitle.Text;
// The Cmbbook stores the orders of all books.
// The CmbBookTitle stores the titles of books
// The Cmbchapter stores all chapters orders of the book
corresponding to the item selected
// The Cmbverse stores all verses orders of the 1st book
chapter
try
AppDMod.Table3.DisableControls;
// Values, combo and ...
AppDMod.Table3.First;
AppDMod.Table3.MoveBy(2);
vrecno1 := firstrec;
ii := 0;
jj := 0;
while not AppDMod.Table3.Eof do
begin
//where book field = VBook, Chapter field = '001' and
Verse field = '001'
if (AppDMod.Table3.Fields.Fields[2].Value = Vtitle) then
Begin
if (AppDMod.Table3.Fields.Fields[3].Value = '001') then
Begin
if (AppDMod.Table3.Fields.Fields[4].Value = '001') then
begin
self.cmbchapter.Items.Add(AppDMod.Table3.Fields.Fields[3].Value);
self.cmbverse.Items.Add
(AppDMod.Table3.Fields.Fields[4].Value);
ArChapter[ii] := vrecno1;
ArVerse[jj] := vrecno1;
ii := ii + 1;
jj := jj + 1;
end
else
begin
self.cmbverse.Items.Add(AppDMod.Table3.Fields.Fields[4].Value);
ArVerse[jj] := vrecno1;
jj := jj + 1;
end
end
else if (AppDMod.Table3.Fields.Fields[4].Value = '001')
then
begin
self.cmbchapter.Items.Add(AppDMod.Table3.Fields.Fields[3].Value);
ArChapter[ii] := vrecno1;
ii := ii + 1;
end
end;
vrecno1 := vrecno1 + 1;
AppDMod.Table3.Next;
end;
self.cmbbook.ItemIndex := self.cmbTitle.ItemIndex;
self.cmbchapter.ItemIndex := 0;
self.cmbverse.ItemIndex := 0;
finally
AppDMod.Table3.EnableControls;
end;
// Into the Record data boxes, displays the following
data:
// the order and title of the book,
// the 1st chapter order of the book,
// the 1st verse order of the 1st chapter
// and the contents of the 1st verse.
SetBookValues(ArTitle[self.cmbbook.ItemIndex]);
end;
procedure TBook.cmbchapterChange(Sender: TObject);
var
VBook : String;
VChapter : String;
vrecno1 : Integer;
ii : Integer;
begin
// 80 = Max number of Verses of Chapters of Books in
Bibletable of KJV2002.mdb
SetLength(ArVerse, 80);
// ComboBox, clear
self.cmbverse.Items.Clear;
AppDMod.Table3.Active := True;
// Book field Value
VBook := self.cmbBook.Text;
// Chapter field Value
VChapter := self.cmbchapter.Text;
// The Cmbbook stores the orders of all books.
// The CmbBookTitle stores the titles of books
// The Cmbchapter stores all chapters orders of the book
corresponding to the item selected
// The Cmbverse stores all verses orders of the 1st book
chapter
try
AppDMod.Table3.DisableControls;
// Values, combo and ...
AppDMod.Table3.First;
vrecno1 := ArChapter[self.cmbchapter.ItemIndex];
AppDMod.Table3.MoveBy(vrecno1);
ii :=0;
while not AppDMod.Table3.Eof do
begin
//where book field = VBook, Chapter field = VChapter
if (AppDMod.Table3.Fields.Fields[1].Value = Vbook) and
(AppDMod.Table3.Fields.Fields[3].Value = VChapter) then
Begin
self.cmbverse.Items.Add
(AppDMod.Table3.Fields.Fields[4].Value);
ArVerse[ii] := vrecno1;
ii := ii + 1;
end;
vrecno1 := vrecno1 + 1;
AppDMod.Table3.Next;
end;
self.cmbverse.ItemIndex := 0;
finally
AppDMod.Table3.EnableControls;
end;
// Into the Record data boxes, displays the following
data:
// the order and title of the book,
// the 1st chapter order of the book,
// the 1st verse order of the 1st chapter
// and the contents of the 1st verse.
SetBookValues( ArChapter[self.cmbchapter.ItemIndex]);
end;
procedure TBook.cmbverseChange(Sender: TObject);
begin
// Into the Record data boxes, displays the following
data:
// the order and title of the book,
// the 1st chapter order of the book,
// the 1st verse order of the 1st chapter
// and the contents of the 1st verse.
SetBookValues( ArVerse[self.cmbverse.ItemIndex]);
end;
procedure TBook.PageControl1Change(Sender: TObject);
begin
end;
end. | | |
|
|