DelphiVCL4Python - VCL.ActivityIndicator Sample
This is a sample that shows the use of the TActivityIndicator control directly from a Python script.
You can find the ActivityIndicator sample project at:
- GitHub Repository for DelphiVCL4Python: https://github.com/Embarcadero/DelphiVCL4Python/tree/main/samples/ActivityIndicator
This application demonstrates the ActivityIndicator control and shows how to modify its various properties directly from a Python script. The application uses the following controls:
ai: The activity indicator.grp_indicator_size: Sets the size of the activity indicator.grp_indicator_color: Sets the color of the activity indicator.grp_indicator_type: Sets the type of the activity indicator.trk_frame_delay: Sets the frame delay of the activity indicator.chk_animate: Toggles the Animate property of the activity indicator.cbx_form_color: Sets the Color of the form if the current style isWindows.cbx_vcl_styles: A combo box that allows you to change the style of the application. You can choose between any style that is active in the Application Appearance - Custom Styles options for this project.
- We strongly recommend using PyScripter IDE:
- SourceForge: https://sourceforge.net/projects/pyscripter/
- GitHub: https://github.com/pyscripter/pyscripter
- Navigate to the location given above and open:
- PyScripter IDE: activityindicator.py.
-
Under Tools->Tools choose Install Packages with pip.
-
In the dialog box Package Name type delphivcl.
-
Press Ctrl + F9 or choose Run > Run.
-
Change the different options on the form and test the functionality of the activity indicator. Modify color, size, animation speed and the type of the activity indicator.
On initialization init, the __create_comps creates all the visual components and attatch them to the ActivityIndicatorForm form. The __config_comps set all visual components properties. The application defines the following event handlers:
__grp_indicator_type_click: Changes the type of the activity indicator.__grp_indicator_size_click: Changes the size of the activity indicator.__grp_indicator_color_click: Changes the color of the activity indicator.__cbx_form_color_change: Changes the size of the activity indicator.__trk_frame_delay_change: Changes the frame delay of the activity indicator.__cbx_vcl_styles_change: Sets the style for the application.__chk_animate_click: Enables or disables the animation of the activity indicator.