Board index » delphi » DisableControls Question -- sort of

DisableControls Question -- sort of

Not really a DisableControls (because I'm not dealing with data aware
controls) question, but related to it:

I'm creating a bunch (about a hundred, depending on user's choice) of
(non-data-aware) controls (Panels) at run time.  I would like them to appear
all at once, after I've correctly sized and positioned them all.  I want to
turn off screen-updating until all the sizing and positioning is done -- so
there won't be so much flickering behavior.  I seem to recall seeing a way
to do that, but I'll be damned if I can find it now.

As a work-around, I've made them all invisible, then adjusted, then made
them visible, but that's not really satisfactory.
--
David Howorth

 

Re:DisableControls Question -- sort of


David,
  Give this a try:

LockWindowUpdate(Form1.Handle);   { Too lock the form }

{Do your stuff}

LockWindowUpdate(0);  { Too unlock the form  }

Hope this helps!  
--

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

David B. Howorth <howo...@teleport.com> wrote in article
<6co36h$8r...@news1.teleport.com>...

Quote
> Not really a DisableControls (because I'm not dealing with data aware
> controls) question, but related to it:

> I'm creating a bunch (about a hundred, depending on user's choice) of
> (non-data-aware) controls (Panels) at run time.  I would like them to
appear
> all at once, after I've correctly sized and positioned them all.  I want
to
> turn off screen-updating until all the sizing and positioning is done --
so
> there won't be so much flickering behavior.  I seem to recall seeing a
way
> to do that, but I'll be damned if I can find it now.

> As a work-around, I've made them all invisible, then adjusted, then made
> them visible, but that's not really satisfactory.
> --
> David Howorth

Other Threads