browse display 'flickers' - FIX 
Author Message
 browse display 'flickers' - FIX

Quote:

> Hello everybody,

> I am using CW2.0 for a few months now and really start to like it. Building
> Applications sometimes is just a matter of days instead of weeks or even
> months.

> There is one annoying thing, though, that i can't get hold on. Every
> browsebox on the screen looks to be drawn twice each time the window is
> opened. This gives a 'flickering' effect on every browse and lookup-box.

> Is there a way to prevent this?

> Any help would be greatly appreciated,

Well I have noticed this too and After studying the Template Code I have
noticed that the Call to the Display in the Refresh window routine is
called twice when the window is opened and that what is giving the
Flickering effect...

I have mad some Mod to the template.. and her are the code.. I added...
A the Following to the CtlBrow.tpw under

#GROUP(%BrowseRoutineNewSelection)
!----------------------------------------------------------------------
%InstancePrefix:NewSelection ROUTINE

In this section at the end the Code of this group The last tow lines are

    DO RefreshWindow
  END

Set an implicit Variable to True and add it before the Do Refreshwindow
line

     CFC:Display# = True

now Search for #AT(%RefreshWindowBeforeDisplay)

and after #Resume at the End of that Block of code.. Add the Following
code

  IF CFC:Display#
    CFC:Display# = False
    DISPLAY()
    ForceRefresh = False
    Exit
  ELSE
    ForceRefresh = False
    Exit
  End!IF CFC:Display#

This way the Display will be Issued only once... and you will not see
the flickering effect any more...

Now if u do not want to change the template.. you cand add the the
setting of the implisit variable to the NewSelection embed point of the
browse Before Generated Code... and you could add the checking for the
display Code to the Refreshwindow before display Embed poit..

But you also need to check the gerated code.. so you will copy.. any
code generated by the template before the Display Checking

as an example on one of my browses... the Following Code is
generated..after the embed point and before the display..

  ?Browse:1{Prop:VScrollPos} = BRW1::CurrentScroll
  CASE BRW1::SortOrder
  OF 1
    FIL:ClientName = BRW1::Sort1:LocatorValue
  OF 2
    FIL:BarCode = BRW1::Sort2:LocatorValue
  OF 3
    FIL:ClientNo = BRW1::Sort3:LocatorValue
  END

You need to past that code in your embed point before the added code to
perform the Display... your Embed point code should look like This

  ?Browse:1{Prop:VScrollPos} = BRW1::CurrentScroll
  CASE BRW1::SortOrder
  OF 1
    FIL:ClientName = BRW1::Sort1:LocatorValue
  OF 2
    FIL:BarCode = BRW1::Sort2:LocatorValue
  OF 3
    FIL:ClientNo = BRW1::Sort3:LocatorValue
  END
  IF CFC:Display#
    CFC:Display# = False
    DISPLAY()
    ForceRefresh = False
    Exit
  ELSE
    ForceRefresh = False
    Exit
  End!IF CFC:Display#

I hope I was Clear Enough in my explanation...

Sincerely,

Fadi G. Ashi  CFC Computer Consulting....



Tue, 30 Mar 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. browse display 'flickers'

2. browse display 'flickers'

3. displaying the check's in browse

4. does 'making image consistent' harm fixes

5. Where are the 'Hot Fixes' - CW4

6. GNU Script isn't fixing something that's broken, so is doomed

7. A Y2K 'Fix' Story

8. memory leak and leak-fixing 'patterns'

9. Patch to 'fix-up' comparisons

10. GNU Script isn't fixing something that's broken, so is doomed

11. GNU Script isn't fixing something that's broken, so is doomed

 

 
Powered by phpBB® Forum Software