Board index » delphi » How to disable control refresh in screen?

How to disable control refresh in screen?

To avoid the slow refresh of certains controls in screen, some languages
have the feature of temporarily disable the screen output until the
update of controls have been finished.
This technique can enhance the appearance of a application.
In the old DOS-Clipper i have used dispbegin( ) and  dispend( )
functions. In MS-Access can make it with Application.Echo property.
I not have found in Delphi 3.0 something to make this.
Exists?

Thanks,

 

Re:How to disable control refresh in screen?


Quote
On Fri, 18 Dec 1998 00:50:39 +0100, "Cugel S." <cug...@hotmail.com> wrote:
>To avoid the slow refresh of certains controls in screen, some languages
>have the feature of temporarily disable the screen output until the
>update of controls have been finished.
>This technique can enhance the appearance of a application.
>In the old DOS-Clipper i have used dispbegin( ) and  dispend( )
>functions. In MS-Access can make it with Application.Echo property.
>I not have found in Delphi 3.0 something to make this.
>Exists?

Use the DisableControls and EnableControls methods of TDataSet (and
descendent components).

  with Table1 do begin
    DisableControls;
    { do a buncha stuff }
    EnableControls;
  end;

//////////////////////////////////////////////////////////////////////////
Steve Koterski                      "The knowledge of the world is only to
Technical Publications              be acquired in the world, and not in a
INPRISE Corporation                 closet."
http://www.inprise.com/delphi          -- Earl of Chesterfield (1694-1773)

Re:How to disable control refresh in screen?


Try checking out LockWindowUpdate() in the online help.  Might be what your
looking for.

Hope this helps!
--

Rodney E Geraghty
GERA-Tech
Ottawa, Canada
gera...@ibm.net

Cugel S. <cug...@hotmail.com> wrote in article
<367998CF.BD524...@hotmail.com>...

Quote
> To avoid the slow refresh of certains controls in screen, some languages
> have the feature of temporarily disable the screen output until the
> update of controls have been finished.
> This technique can enhance the appearance of a application.
> In the old DOS-Clipper i have used dispbegin( ) and  dispend( )
> functions. In MS-Access can make it with Application.Echo property.
> I not have found in Delphi 3.0 something to make this.
> Exists?

> Thanks,

Re:How to disable control refresh in screen?


Quote
Cugel S. <cug...@hotmail.com> wrote in message

news:367998CF.BD524F62@hotmail.com...

Quote
>To avoid the slow refresh of certains controls in screen, some languages
>have the feature of temporarily disable the screen output until the
>update of controls have been finished.
>This technique can enhance the appearance of a application.
>In the old DOS-Clipper i have used dispbegin( ) and  dispend( )
>functions. In MS-Access can make it with Application.Echo property.
>I not have found in Delphi 3.0 something to make this.
>Exists?

Here's one idea for you:

When adding items to a list, for example, you might want to use:

ListBox1.Items.BeginUpdate;
try
    ListBox1.Add('Hello');
    ListBox1.Add('World');
    ListBox1.Add('!');
finally
    ListBox1.Items.EndUpdate;
end;

This applies to most visual components having a property of type TStrings.

    Uri

Other Threads