I am solved using this method // --------------------------------------- ----------------------------------
#include
#pragma HDRSTOP
#include "unit1.h"
/ / -------------------------------------------------------------------------------------------- ---------------------------
#pragma package (smart_init)
#pragma resource "* .dfm"
TFORM1 * FORM1;
/ / -------------------------------------------------------------------------------------------- ---------------------------
__fastcall tform1 :: tform1 (tComponent * Owner)
: TFORM (OWNER)
{
}
/ / -------------------------------------------------------------------------------------------- ---------------------------
Void __fastcall tform1 :: formcreate (TOBJECT * SENDER)
{
Table1-> first ();
For (int i = 0; i
{ListBox1-> items-> add (table1-> fieldbyname ("name") -> asstring);
Table1-> next ();
}
}
/ / -------------------------------------------------------------------------------------------- ---------------------------
Void __fastcall tform1 :: ListBox1click (Tobject * Sender)
{
Table1-> first ();
Ansistring a;
A = Table1-> FieldbyName ("Name") -> asstring;
For (int i = listbox1-> items-> count-1; i> = 0; i -)
{
IF (listbox1-> items-> strings [listbox1-> itemindex] == a)
Edit1-> Text = Table1-> FieldByname ("DESC") -> asstring;
Table1-> next ();
A = Table1-> FieldbyName ("Name") -> asstring;
}
}
/ / -------------------------------------------------------------------------------------------- ---------------------------
Back to top