Progress indicator adorner

Last week in Stockholm norpe showed me how to add a progress indicator Adorner to a ListView when I call an M3 API in a background thread in a Personalized Script for Lawson Smart Office. When I execute a time consuming operation I like to maintain good usability by indicating activity to the user. For that, I used to display a message to the user in a Label like “Loading please wait…”, but that doesn’t catch the eye very well, and/or I used to changed the mouse cursor to Cursor.Wait. but I think that’s a shared resource. So I prefer this new technique.

It’s only two lines of code from Mango.UI.Controls:

ProgressIndicatorAdorner.AddAdorner(element, useOpacity, scaleFactor);
ProgressIndicatorAdorner.RemoveAdorner(element);

Here’s the method’s signature:
Reflector

Here’s the result:
1_ 2_

That’s it.

Published by

thibaudatwork

M3 Technical Consultant

3 thoughts on “Progress indicator adorner”

  1. UPDATE: To add the adorner to an M3 panel, call the method on element controller.RenderEngine.Host.HostContent; if used in panel B it will disable the list and its scrollviewer, at the bottom it will disable the panel sequence and navigation buttons, and at the top it will disable the Sorting Order, View, toolbar, and menu; great. However, the adorner doesn’t disable the keyboard shortcuts such as F5-Refresh; that would need to be handled in the event OnRequesting or something.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s