About this plugin
This plugin implement the ComboBox Extended control from Windows, allowing you to use three differents styles of lists: ComboBox, DropDownList and SimpleList. You can use any number of lists, with their own options, properties, images, events, etc.
All three list styles allow you to put items with images for two states: normal and selected. Also you can indent the items, viewing the list similar that a treeview control style. Add, update, get the total items, all with the appropiate actions editors.
Thirparty
This plugin are imposible without the aid of this people:
Thanks a lot!
Create a new instance of a List object and attach it to a NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Destroy a previously List object instance and deattach from their NeoBook rectangle. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Destroy all previously List objects instances and deattach from their NeoBook rectangles.
Add a new item to the specified List object instance. Specify the caption (text), image index, selected image index and indent values for the new item. Image index and selected image index can be "-1", in order to no use any posible image. Indent can be the number of pixels to indent the item text or "0" if you don't want to indent the item text. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Get an item of the specified List object instance. Specify the index of the item to retrieve their text. The result variable store the item text if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Set an item of the specified List object instance. Change (update) the properties of a previously added item. See the npListAddItem for details about the possible item properties and values. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Get the text property of the specified List object instance. The result variable store the text of the list (when the list is a simple combobox, the text is the value that the user can edit directly writing on the control) if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Set the text property of the specified List object instance. This action have sense when the list is a simple combobox. The text property is the text that the user can edit directly writing on the control. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Get the item index (selected item) of the specified List object instance. Remember the list items are zero indexed, so the first item is "0", the second "1", the third "2" and so on. The result variable store the selected item index ("-1" if the list have no selected item) if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Set the item index (selected item) of the specified List object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Find if certain item text is on the specified List object instance. The result variable store the index (zero indexed) of the item if found, or "-1" if not found. The result variable also can store "False" if an error occur. In this last case the [LastError] variable store information about the error.
Get the total items count of the specified List object instance. The result variable store the total items count, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Add a bitmap image to the specified List object instance, in order to be available to use associated to one or more list items. Note that the list images sizes are setting using the latest added image. I recomend you to use images of the same size, like 16x16, 32x32, 48x48 pixeles, etc. The result variable store the index of the added image if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error. You can use the index of the image when add items to the list, that is, when you add a new image the index (returned by this action) is "0", so you can specify "0" to the image and selected image index of an item.
Specify general options of a List object instance. Below you can view the available options and the available values:
The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
Set a publication subroutiune to be executed when the specified List object instance change event is fired. The rectangle variable store the rectangle object name that fire the event. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.
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.