PDA

View Full Version : tabs and dbgrid controls


garwain
07-19-2001, 05:17 AM
I have run into some trouble with a program. I have set up the tab order on all my components and I have a DBGrid in the middle of my form. If I take off the tabs option on the grid everything works fine, but users want to be able to tab through the fields in the grid. Now with the tabs option back on, it's impossible to tab out of the grid.

How would I fix it so that when a user tabs to the last field of the last line of the grid they get taken to the next control in the taborder?

thanks
Ben

b-w-d.net
07-19-2001, 05:52 AM
this this code:

procedure TForm1.DBGrid1ColEnter(Sender: TObject);
begin
if dbgrid1.Selectedindex+1 := dbgrid1.columns.count then dbgrid1.tabstop:=false;
end;

procedure TForm1.TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
var AllowChange: Boolean);
begin
dbgrid1.tabstop:=true;
allowchange:=true;
end;

were we have the controls TabbedNotebook1 and DBGrid1.

hope that helps you

see you arround, bye!

----------------------------

[b]webmaster@b-w-d.net

[if this helps you please click on Accept]

<tt>"Good are those things that you favour, evil is your sour flavour"</tt>