Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

readme.md

DelphiVCL4Python - VCL.ActivityIndicator Sample

DelphiVCL4Python - VCL.ActivityIndicator Sample

This is a sample that shows the use of the TActivityIndicator control directly from a Python script.

Contents

Location

You can find the ActivityIndicator sample project at:

Description

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 is Windows.
  • 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.

How to Use the Sample

  1. We strongly recommend using PyScripter IDE:
  1. Navigate to the location given above and open:
  • PyScripter IDE: activityindicator.py.
  1. Under Tools->Tools choose Install Packages with pip.

  2. In the dialog box Package Name type delphivcl.

  3. Press Ctrl + F9 or choose Run > Run.

  4. 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.

Implementation

ActivityIndicatorForm

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.

Uses

See Also