ProgressBar for long loading of layers

Loading large layers in mapwingis from PostgreSQL. With a slow connection, it takes quite a long time. Tell me how you can implement ProgressBar. What event should I link it to? How can this be implemented?

Hello @mainxt

The ICallback interface is available on a number of the classes, and includes a Progress callback. I don’t know off-hand whether this will provide the level of detail you’re looking for, but I would try implementing the ICallback interface and setting it into a number of the classes you are using, for example, see OgrDatasource.GlobalCallback.

Hope that helps.
Jerry.

Hello @jerryfaust
Thank you, I think that will be enough.

Hello again.

Perhaps you already noticed, but the GlobalCallback I suggested is actually being deprecated in favor of the GlobalSettings.ApplicationCallback.

The callback itself is identical, but the global setting sets up callbacks for all capable classes. So the primary difference in your implementation may be that you have to watch for a specific KeyOfSender in your Progress handler (for instance, if you only want to monitor the progress of the OgrDatasource).

Kind Regards,
Jerry.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.