Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-01

DisableControls and ControlsDisabled method/property of TDataset

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

pascalive

Recently the mentioned method/property was added to Tdataset. I'd like to know what's the behavior of them: when is supposed to be called, whats the consequence...

I'm mantaining the sqlite wrapper (TDataset) and would like to know if its necessary to modify something in it

Thanks

Luiz Americo

__________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/

Reply by email

Unknown author
to pascalive
pascalive wrote
Recently the mentioned method/property was added to Tdataset. I'd like to know what's the behavior of them: when is supposed to be called, whats the consequence... I'm mantaining the sqlite wrapper (TDataset) and would like to know if its necessary to modify something in it

No it is not.

Suppose you want to do a scan over the dataset's records. You don't want the controls attached to it to show this 'scan', so what you do is something like this:

DS.DisableControls;
Try
  DS.First;
  While not DS.EOF do
   begin
   // Do stuff
   DS.Next;
   end;
Finally
  DS.EnableControls;
end;

This way, if you have e.g. a grid, the grid will not scroll along during the loop.

Michael.

Reply by email