npBars plugin

About this plugin

This plugin offer to you a fully customizable progress bar control. You can customize the control in various ways, setting the font, colors and other general options. You can manage all the progress bar controls that you need.

Every bar object can have their own font, colors, options and events. You can set up to six bar colors and lot of options that determine, for example, the bar bitmap, direction, bar caption, percentage, max and min progress values, and more.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npBarCreate

Create a new Bar object instance and attach it to a NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarDestroy

Destroy a previously created Bar object instance and deattach it from their NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarDestroyAll

Destroy all currently availables instances of Bar objects.

↑↑

npBarSetPos

Set the progress position of a Bar object instance. The position must be in the range of bar min and max values. You can determine this min and max values using npBarOptions. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarGetPos

Get the progress position of a Bar object instance. The result variable store the bar position value if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarFont

Set the caption font of a Bar object instance. The font must be on a "NeoBook format". Of course you can use the action property form to set the bar caption form easly. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarBitmap

Set a progress bitmap image of a Bar object instance. The image path must point to a valid BMP image. This image is used on the bar to show the progress to the user. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarColors

Set the colors of a Bar object instance. All colors must be in "NeoBook format" (R,G,B). The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npBarOptions

Set the options of a Bar object instance. You can set the following options:

(1) The bar colors style can be one of the following values: cs1Color, cs2Colors, cs3Colors. You can set this colors using npBarColors.

(2) The bar direction can be one of the following values: pdLeftToRight, pdRightToLeft, pdBottomToTop, pdTopToBottom.

The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnBarClick

Set a subroutine to be executed when the user click on a Bar instance object. You receive on the rectangle variable the name of the rectangle that bar is attached on. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnBarDblClick

Set a subroutine to be executed when the user double click on a Bar instance object. You receive on the rectangle variable the name of the rectangle that bar is attached on. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑