Home > Back-end >  Dbgrid press automatic newline line increase
Dbgrid press automatic newline line increase

Time:09-30

Examples of books, but can't run,,
 procedure TForm1. DBGrid1KeyPress (Sender: TObject; Var Key: Char); 
The begin
If not, the Key # [13]) in then
If not frmlookup. Showing then
The begin
Frmlookup. Left:=TMydbgrid (dbgrid1) GetCellRect. Left;
Frmlookup. Top:=tmydbgrid (DBGrid1) getcellrect. Bottom;
Frmlookup. Show;
end;

If the Key=# 13 then
The begin
If DBGrid1. SelectedIndexThe begin
DBGrid1. SelectedIndex:=DBGrid1. SelectedIndex + 1;
End
The else
The begin
If DBGrid1. The DataSource. The DataSet. RecNoThe begin
DBGrid1. The DataSource. The DataSet. RecNo:=DBGrid1. The DataSource. The DataSet. RecNo + 1;
End
The else
The begin
DBGrid1. The DataSource. The DataSet. Append;
end;
DBGrid1. SelectedIndex:=0;
end;
end;
end;




The
 if not frmlookup. Showing then 
The begin
Frmlookup. Left:=TMydbgrid (dbgrid1) GetCellRect. Left;
Frmlookup. Top:=tmydbgrid (DBGrid1) getcellrect. Bottom;
Frmlookup. Show;

Is a variable, the frmlookup? Or,,, I don't understand this paragraph???????
And with RecordCount RecNo how should understand good??

CodePudding user response:

You for carriage returns increase, the code below can be achieved,
Operation error, put this code commented
Frmlookup seems to be a form

CodePudding user response:

Frmlookup is supposed to be a form, hold down CTRL and click to see where to jump...

CodePudding user response:

reference 1st floor u012072926 response:
you to implement a carriage returns increase, the code below can be achieved,
Operation error, put this code commented
Frmlookup seems to be a form


With frmlookup error, (code with the comments,
 if DBGrid1. SelectedIndex 
This error

CodePudding user response:

refer to the second floor mathsfan response:
frmlookup is supposed to be a form, hold down CTRL and click to see where to jump...
code, this is my books I knock up...

CodePudding user response:

reference zengwj1537 reply: 3/f
Quote: refer to 1st floor u012072926 response:

You for carriage returns increase, the code below can be achieved,
Operation error, put this code commented
Frmlookup seems to be a form


With frmlookup error, (code with the comments,
 if DBGrid1. SelectedIndex 
This error
will be an error, because you don't have frmlookup
If DBGrid1. SelectedIndexWhat wrong post out this report
  • Related