Board index » delphi » TabStop property for DBGrid

TabStop property for DBGrid

Hey all,

I have a DBGrid that keeps track of phone calls made to and from our
clients.  A couple of these fields on the DBGrid are automatically filled in
by the program, such as the user's ID, and date and time of call.  Since
these fields are automatically filled in, I do not want the user to be able
to access them.  Naturally, I thought of setting the TabStop property to
False.  However, there is no TabStop property for these fields (i double
clicked on the form's table component).

Is there another place I should be looking...or can this be done through
code???

I'm fairly new to Delphi (as you can probably tell), so please be kind in
your responses.

Thanks a lot!

-Mike

 

Re:TabStop property for DBGrid


Quote
Michael Todd Bublitz wrote:

> Hey all,

> I have a DBGrid that keeps track of phone calls made to and from our
> clients.  A couple of these fields on the DBGrid are automatically filled in
> by the program, such as the user's ID, and date and time of call.  Since
> these fields are automatically filled in, I do not want the user to be able
> to access them.  Naturally, I thought of setting the TabStop property to
> False.  However, there is no TabStop property for these fields (i double
> clicked on the form's table component).

The fields have a "read only" property that makes DBGrid jump over them when using
<TAB> (not for arrow keys). Problem: now the field is "completely" write protected.
(I guess this feature was added the night before Delphi was released, it doesn't
even allow calculated fields to calculate their values).

To completely disable a field You'll have to write code into the (...)ColEnter and
(...)ColExit events that makes the cursor jump to a different column (e.g.
according to the fields "Tag" property.

Mail me to get a working demo or a code sample...

Thomas Schimming

Other Threads