Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: How can I temporarily suppress display update of TImageViewer?


This question is answered.


Permlink Replies: 2 - Last Post: Aug 13, 2017 11:17 AM Last Post By: Don Rowe Threads: [ Previous | Next ]
Don Rowe

Posts: 27
Registered: 7/1/11
How can I temporarily suppress display update of TImageViewer?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 12, 2017 3:23 PM
I'm using Rad Studio Tokyo and C++. I'd like to temporarily suppress display update of a TImageViewer object during multiple operations such as BitmapScale followed by ScrollBy. Scaling centers the image and I have to immediately scroll to re-position so the same part of the image stays under the mouse cursor following scaling. When there's a big contrast between the center of the image and the part I need visible, it creates a very annoying flickering. I tried changing the Visible and Opacity fields with no change. Thanks in advance.
Antonio Estevez

Posts: 564
Registered: 4/12/00
Re: How can I temporarily suppress display update of TImageViewer?
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 12, 2017 5:06 PM   in response to: Don Rowe in response to: Don Rowe
El 13/08/2017 a las 0:23, Don Rowe escribió:
I'm using Rad Studio Tokyo and C++. I'd like to temporarily suppress display update of a TImageViewer object during multiple operations such as BitmapScale followed by ScrollBy. Scaling centers the image and I have to immediately scroll to re-position so the same part of the image stays under the mouse cursor following scaling. When there's a big contrast between the center of the image and the part I need visible, it creates a very annoying flickering. I tried changing the Visible and Opacity fields
with no change. Thanks in advance.

As with any other component:

    ImageViewer1->BeginUpdate();
    try
    {
       // Do the operations here
    }
    __finally
    {
       ImageViewer1->EndUpdate();
    }
Don Rowe

Posts: 27
Registered: 7/1/11
Re: How can I temporarily suppress display update of TImageViewer?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 13, 2017 11:17 AM   in response to: Antonio Estevez in response to: Antonio Estevez
That's just what I needed, Antonio. Thanks for helping me learn Firemonkey basics.

As with any other component:
    ImageViewer1->BeginUpdate();
    try
    {
       // Do the operations here
    }
    __finally
    {
       ImageViewer1->EndUpdate();
    }
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02