githubEdit

Progress Bar Control Class

Brief Introduction to Progress Bar Control

Progress bar control is an essential control in GUI system, which can visually show progress of an item and is often used in file copying, software installation and file transmission. Progress bar control in mGNCS is strengthened and reconstructed based on the built-in progress bar control in MiniGUI 3.0, and setting of renderer is added, making it easier to use and more splendid.

mProgressBar

  • Control window class: NCSCTRL_PROGRESSBAR

  • Control English name: ProgressBar

  • Brief introduction: Used to show progress, often used in file copying, software installation and file transmission.

  • Schematic diagram:

alt

Style of mProgressBar

It is inherited from the style of mWidget

Style ID

miniStudio property

Explanation

Comments

NCSS_PRGBAR_HORIZONTAL

--

In miniStudio, the two styles are divided into two controls to use, respectively corresponding to

Horz ProgressBar

NCSS_PRGBAR_VERTICAL

--

^

Vert ProgressBar

NCSS_PRGBAR_BLOCKS

BlockChunk->TRUE

Block progress

prog_block.png

NCSS_PRGBAR_SMOOTH

BlockChunk->FALSE

Smooth progress, relative to the above block progress

prog_smooth.png

NCSS_PRGBAR_SHOWPERCENT

ShowPercent

Display the current progress value (percentage)

prog_per.png

Property of mProgressBar

It is inherited from the property of mWidget

Property name

miniStudio property name

Type

RW

Explanation

NCSP_PROG_MAXPOS

MaxPos

int

RW

Maximum value of the progress range

NCSP_PROG_MINPOS

MinPos

int

RW

Minimum value of the progress range

NCSP_PROG_CURPOS

CurPos

int

RW

Current progress value

NCSP_PROG_LINESTEP

LineStep

int

RW

Step length

Event of mProgressBar

It is inherited from the event of mWidget.

The control class does not have newly added event

Method of mProgressBar

It is inherited from the method of mWidget

increase

  • Parameter:

    • self :control object pointer

    • delta :increase amplitude

  • Explanation: users can use the function to control increase of the progress value; delta is used to appoint the increase amount, which is generally used to control the increase effect of non even speed

  • Example:

stepIncrease

  • Parameter:

    • self :control object pointer

  • Explanation: the function can increase the progress value by step; calling once, a step length value is increased, and even-speed increase effect can be realized; setting of step length value is completed through corresponding properties

  • Example:

Renderer of mProgressBar

Classic Renderer

It is inherited from the classic renderer of mWidget.

Property name

miniStudio property

Type

Schematic diagram

Explanation

NCS_BGC_HILIGHT_ITEM

ChunkColor

DWORD(ARGB

classic_prog.png

Color of chunk part of the progress bar, and this renderer uses the color of highlight item to draw

Fashion Renderer

It is inherited from the fashion renderer of mWidget.

Property name

miniStudio property name

Type

Schematic diagram

Explanation

NCS_BGC_PRGBAR_CHUNK

ChunkColor

DWORD(ARGB

fsh_prog.png

Foundation color of chunk part of the progress bar, and the renderer will lighten or darken according to this color to draw progress bar of gradual change effect

Flat Renderer

It is inherited from flat renderer of mWidget.

Property name

miniStudio property name

Type

Schematic diagram

Explanation

NCS_FGC_WINDOW

ChunkColor

DWORD(ARGB

flat_prog.png

Color of chunk part of the progress bar, here window foreground color is used

Skin Renderer

Refer to Specification for Image Resource Used by Skin Rendererarrow-up-right

Instance of mProgressBar

  • ProgressBar Example code

  • ProgressBar template

  • Initialize the property of ProgressBar

  • In Timer message, change the property value of ProgressBar


<< Spinner Control Class | Table of Contents | Property Sheet Control Class >>

Last updated