ListBoxEx Plugin Help

ListBoxEx Plugin

Welcome

ListBoxEx Object Plugin Help File

Plugin Name :

ListBoxEx

Current Version :

1.3.0.0

Last Update :

15/03/2009 (dd/mm/yyyy)

System Requirements :

Requires Win2000 Or Above

Additional Dependencies :

None

Licence :

Commercial

Author :

www.amsplugins.com

Web :

www.amsplugins.com

E-mail :

support@amsplugins.com

Copyright :

The ListBoxEx plugin is copyright © 2008 Reteset.

Credits :

AMS ActionFile Editor Is Mostly Used On Creation Of This Help File

This Plugin Is Dedicated To Fitz Solutions Inc.
Many Thanks To Dermot Fitzpatric He Was Guide To Us To Make This Plugin

Copyright © 2008 Reteset.
All Rights Reserved.


ListBoxEx Plugin

Events

Events

On Create

Fires during object creation Tip : set image list and object style at this time.

On Enter

Fires when the mouse enters the object.

On Leave

Fires when the mouse leaves the object.

On Select

Fires when the user selects an item .

e_Index:

(number) The index of item that is selected.

On CheckBox

Fires when user checks or unchecks the chekBox of an item .

e_Index:

(number) The index of item that is selected.

e_Index:

(boolean) The status of checkbox. this argument is true if item checkbox is checked ,and false if item checkbox is unchecked

On DoubleClick

Fires when the user double clicks to an item .

e_Index:

(number) The index of item that is double clicked.

On RightClick

Fires when the user right clicks to an item .

e_Index:

(number) The index of item that is right clicked.

On Focus

Fires when the object gets input focus

On MB-LeftClick

Fires when the user left clicks to message-bar of ListBoxEx

On MB-RightClick

Fires when the user right clicks to message-bar of ListBoxEx

On DopFiles

Fires when user drops Files/Folders over ListBoxEx object , if drag and drop is enabled.

e_Count:

(number) The number of items dropped by user (Always more than 0 (zero)) .


ListBoxEx Plugin Help

ListBoxEx Plugin

Properties

Properties

BackGround

Specifies the background color of ListBoxEx object. you can select a color via color picker .

Item

Specifies the default item color of ListBoxEx object. you can select a color via color picker .

Selected Item

Specifies the background color of selected item in a ListBoxEx object. you can select a color via color picker .

Grid Lines

Specifies the color of grind dividers of a ListBoxEx object. you can select a color via color picker .

Border Style

Specifies the border style of ListBoxEx object. you can select one of following None , Flat , Sunken ,Bevel .
None : no border
Flat : a thin-line border
Sunken : a border with a sunken edge
Bevel : a border with a raised edge

Check Boxes

Specifies the check boxes are visible or invisible .

Grid Lines

Specifies the grid lines are visible or invisible .

Icons

Specifies the icons are visible or invisible .


ListBoxEx Plugin

Update History

Update History Of ListBoxEx Object Plugin

Verison : 1.0.0.0

  • Released At : 27/12/2008 (dd/mm/yyyy)

  • Inital Release .

    • Verison : 1.1.0.0

  • Released At : 04/02/2009 (dd/mm/yyyy)

  • New : ListBoxEx.GetSize Action Added.

  • New : ListBoxEx.SetSize Action Added.

  • New : ListBoxEx.SetPos Action Added.

  • New : ListBoxEx.GetPos Action Added.

  • Bug Fixed : ListBoxEx.SetUpdate Was Not Set The Update State To True And Was Not Update Object When It Is Set To True.

  • Bug Fixed : ListBoxEx.GetItemData Was Not Return A Value If Data Contains Special Characters ( Especially File Path(s) ).

  • Bug Fixed : ListBoxEx.MessageBarIsVisible Was Requesting 2 Arguments Whereas It Has Only One Argument.

  • Bug Fixed : ListBoxEx.Redraw Was Redrawing Object Twice , Now It Does Once.

    • Verison : 1.2.0.0

  • Released At : 18/02/2009 (dd/mm/yyyy)

  • New : SetItemVisible Action Added. For Easily Expand & Collapse Items

  • New : GetItemVisible Action Added.

  • New : SetItemDataEx Action Added. For To Be Able To Store An Additional Data In Item

  • New : GetItemDataEx Action Added. For To Be Able To Get (If Exist) Additional Data Of An Item

  • New : SetItemGradientStyle Action Added. For To Be Able To Set (If Exist) Gradient Style Of An Item

  • New : GetItemGradientStyle Action Added. For To Be Able To Get Gradient Style Of An Item

  • New : SetCursor Action Added. For To Be Able To Set A Custom Cursor For ListBoxEx

  • New : On CheckBox Event Added. Which Fires When User Checks Or UnChecks ChekBox Of An Item

  • Modified : SetDefaultFont "Textcolor" Argument Added For To Be Able To Set Default Font's Color

  • Modified : SetItemCheck "Event" Argument Added For To Be Able To Set Whether "On CheckBox" Event Will Be Triggered

  • Modified : Properties Dialog Redesigned

  • Bug Fixed : SetDefaultFont Was Causing To Wrong Item Text Placement

  • Bug Fixed : The Item Text Was OverFlowing To Right Side Of Item.

  • Bug Fixed : A Problem Was Causing To Extra (unnecessary) Spaces. Now Item Height Fits To Item Text Or Icon

  • Removed : Item Style 3 Removed. Which Was Drawing A Single Line Text

    • Verison : 1.3.0.0

  • Released At : 15/03/2009 (dd/mm/yyyy)

  • New : Drag And Drop Feature Added

  • New : SetAcceptFiles Action Added. For Allow User To Drop Files/Folders On ListBoxEx Object

  • New : GetAcceptFiles Action Added. For Get Status Of Whether Drag And Drop Enabled Or Not

  • New : GetDroppedFiles Action Added. For To Be Able To Get List Of Files/Folders That Dropped By User

  • New : SetItemHColor Action Added. For To Be Able To Set A Gradient Colors For Highlighted State Of An Item

  • New : GetItemHColor Action Added. For To Be Able To Get Highlighted State Gradient Colors Of An Item

  • New : SetItemHGradientStyle Action Added. For To Be Able To Set (If Exist) Highlighted State Gradient Style Of An Item

  • New : GetItemHGradientStyle Action Added. For To Be Able To Get Highlighted State Gradient Style Of An Item

  • New : SetRaisedEdges Action Added. For To Be Able To Show A Raied Edge Around A ListBoxEx Item

  • New : GetRaisedEdges Action Added. For To Be Able To Get State Raised Edges

  • New : SetCheckListStyle Action Added. For To Be Able To Set ListBoxEx Like A Check List ,When This Enabled User May Check / Uncheck CheckBox Of Item Via Clicking Anywhere Of A Item

  • New : GetCheckListStyle Action Added. For To Be Able To Get Whether Drag And Drop status Enabled Or Not

  • New : FindData Action Added. For To Be Able To Find A Specified String In Data Or ExData Fiels Of ListBoxEx Items

  • New : On DropFiles Event Added. Which Fires When User Drops Files/Folders Over ListBoxEx Object , If Drag And Drop Enabled

  • Modified : InsertItem "HighLightColor" Argument Added For To Be Able To Set Gradient Colors Of Highlight State

  • Modified : AddIcon "Return Value" Added Now It Returns The Index Of Last Added Icon

    • Copyright © 2008 Reteset.


ListBoxEx.MessageBarShow

(boolean) ListBoxEx.MessageBarShow (

(string) ObjectName,

(string) Text,

(number) IconID,

(boolean) CloseButton,

(boolean) WrapText )

Description

Shows a message bar at the top of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Text

(string) The message text.

IconID

(number) The message type icon.

VALUE | DESCRIPTION
-1 | No Icon
0 | Icon Stop
1 | Icon Question
2 | Icon Exclamation
3 | Icon Information

CloseButton

(boolean) if true close button visible , if false close button invisible.

WrapText

(boolean) if true message bar will be resized vertically as text needs , if false long text will be truncated .

Returns

(boolean) retruns true on success. and false on failure


ListBoxEx.MessageBarSetColors

ListBoxEx.MessageBarSetColors (

(string) ObjectName,

(number) Back,

(number) BackHilite,

(number) Text,

(number) TextHilite )

Description

Sets message bar colors of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Back

(number) The background color of messagebar .

BackHilite

(number) The background highlight color of message bar .

Text

(number) The text color of message bar.

TextHilite

(number) The text highlight color of message bar .

Returns

This action dose not return any value.


ListBoxEx.MessageBarIsVisible

(boolean) ListBoxEx.MessageBarIsVisible (

(string) ObjectName )

Description

Determines whether message bar is visible or not

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if message bar is visible. and false if it is invisible


ListBoxEx.MessageBarHide

ListBoxEx.MessageBarHide (

(string) ObjectName )

Description

Hides a message bar at the top of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

This action dose not return any value.


ListBoxEx.SetRaisedEdges

ListBoxEx.SetRaisedEdges (

(string) ObjectName,

(boolean) Visible )

Description

Sets the visibility of raised edges ( border )of ListBoxEx items.
Note: this border draws over grid lines , grid lines will be invisible if you enable raised edges

Parameters

ObjectName

(string) The name of the object.

Visible

(boolean) Whether to make the raised edges visible or invisible.

Returns

This action dose not return any value.


ListBoxEx.SetItemHGradientStyle

ListBoxEx.SetItemHGradientStyle (

(string) ObjectName,

(number) Index,

(number) Style )

Description

Sets the highlight gradient style of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Style

(number) The style of highlight gradient effect.

Possible Values Are:

VERTICAL : Vertical Gradient Style
HORIZONTAL : Horizontal Gradient Style
BACKWARD_DIAGONAL : Backward Diagonal Gradient Style
FORWARD_DIAGONAL : Forward Diagonal Gradient Style

Note: Gradient Style is VERTICAL by default

Returns

This action dose not return any value.


ListBoxEx.SetItemHColor

ListBoxEx.SetItemHColor (

(string) ObjectName,

(number) Index,

(table) HighlightColor )

Description

Sets the highlight color of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

HighlightColor

(table) The Item highlight color table (a numerically indexed table that contains color values )(this table may contain maximum 30 indexes) set nil for use default item highlight color.

Returns

This action dose not return any value.


ListBoxEx.GetRaisedEdges

(boolean) ListBoxEx.GetRaisedEdges (

(string) ObjectName )

Description

Gets the visibility of raised edges ( border )of ListBoxEx items.

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if raised edges are visible. and false if they are not


ListBoxEx.GetItemHGradientStyle

(number) ListBoxEx.GetItemHGradientStyle (

(string) ObjectName,

(number) Index )

Description

Gets the highlight gradient style of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(number) Returns One Of Following
VERTICAL : Vertical Gradient Style
HORIZONTAL : Horizontal Gradient Style
BACKWARD_DIAGONAL : Backward Diagonal Gradient Style
FORWARD_DIAGONAL : Forward Diagonal Gradient Style

Note: This action returns VERTICAL even if item uses default highlight color or single color


ListBoxEx.GetItemHColor

(table) ListBoxEx.GetItemHColor (

(string) ObjectName,

(number) Index )

Description

Gets the highlight color of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

Returns

(table) returns a numerically indexed table that contains color value(s)
if specified item uses default color returns result[1] = -1
if an error occurs the return value is nil

Example:

result = ListBoxEx.GetItemHColor("Plugin1", 2);

sz_string = "";

if (result ~= nil) then

      if (result[1] == -1) then
          Dialog.Message("Notice", "This Item Uses Default Color..");
      else
        min = 1;
        max = Table.Count(result);
           for count = min, max do

              sz_string = sz_string..result[count].."\r\n"
           end

           Dialog.Message("Notice", sz_string);
       end
else
 Dialog.Message("Notice", "Error..");
end


ListBoxEx.SetCursor

(boolean) ListBoxEx.SetCursor (

(string) ObjectName,

(string) Cursor )

Description

Sets the cursor of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Cursor

(string) The path to cursor file (leave blank for restore to default cursor).

Returns

(boolean) Returns true on success ,and false on failure


ListBoxEx.GetItemGradientStyle

(number) ListBoxEx.GetItemGradientStyle (

(string) ObjectName,

(number) Index )

Description

Gets the gradient style of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(number) Returns One Of Following
VERTICAL : Vertical Gradient Style
HORIZONTAL : Horizontal Gradient Style
BACKWARD_DIAGONAL : Backward Diagonal Gradient Style
FORWARD_DIAGONAL : Forward Diagonal Gradient Style

Note: This action returns VERTICAL even if item uses default color or single color


ListBoxEx.SetItemGradientStyle

ListBoxEx.SetItemGradientStyle (

(string) ObjectName,

(number) Index,

(number) Style )

Description

Sets the gradient style of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Style

(number) The style of gradient effect.
Possible Values Are:

VERTICAL : Vertical Gradient Style
HORIZONTAL : Horizontal Gradient Style
BACKWARD_DIAGONAL : Backward Diagonal Gradient Style
FORWARD_DIAGONAL : Forward Diagonal Gradient Style

Note: Gradient Style is VERTICAL by default

Returns

This action dose not return any value.


ListBoxEx.SetStyle

ListBoxEx.SetStyle (

(string) ObjectName,

(table) Style )

Description

Sets the Style Of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Style

(table) The style table with Indexes : Icons , Grid , CheckBoxes .

Table Indexes:

Icons:

(boolean) if true icons are visible . if false icons are invisible.

Grid:

(boolean)  if true grid is visible . if false grid is invisible.

CheckBoxes:

(boolean)  if true check boxes are visible . if false check boxes are invisible.

Returns

This action dose not return any value.

Example:

 ListBoxEx.SetStyle("Plugin1", {Grid = true,Icons = true,CheckBoxes = true});


ListBoxEx.SetMask

ListBoxEx.SetMask (

(string) ObjectName,

(string) MaskFile,

(boolean) FitToWindow = true ,

(number) TransparentColor = 0 )

Description

Applies a "transparency mask" to a ListBoxEx in order to create a custom window shape.

Parameters

ObjectName

(string) The name of the object.

MaskFile

(string) The full path to the transparency map file. Use "" to remove a window mask.

FitToWindow

(boolean) Whether to resize the transparency map file to fit the object's dimensions.

TransparentColor

(number) The color that represents 'transparent' in the transparency map file.

Returns

This action dose not return any value.


ListBoxEx.SetItemIcon

ListBoxEx.SetItemIcon (

(string) ObjectName,

(number) Index,

(number) IconIndex )

Description

Sets a new icon for item that is specified with item index.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

IconIndex

(number) The index of icon in image list.

Returns

This action dose not return any value.


ListBoxEx.SetItemColor

ListBoxEx.SetItemColor (

(string) ObjectName,

(number) Index,

(table) ItemColor )

Description

Sets the color of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

ItemColor

(table) The Item color table ,a numerically indexed table that contains color values
if table contains more than one index a gradient effect will be applied,
if table contains one index a plain back color will be applied
if this argument is nil , default item color will be applied

this table may contain maximum 30 indexes..

Returns

This action dose not return any value.

Example:

    -- Set Item's Background As Gradient With 3 Colors
    ListBoxEx.SetItemColor("Plugin1", 1, {16316664,16764057,16764057});

    -- Set Item's Background Color To Red
    ListBoxEx.SetItemColor("Plugin1", 1, {255});

    -- Reset Item's Background To Default Color
    ListBoxEx.SetItemColor("Plugin1", 1, nil);

end


ListBoxEx.SetImageList

ListBoxEx.SetImageList (

(string) ObjectName )

Description

Sets the image list of a ListBoxEx object.

Note : You Can Call This Action Only Once . Please use this action in On Create event of plugin ,as shown in sample project(s)

Parameters

ObjectName

(string) The name of the object.

Returns

This action dose not return any value.

Example:

bImagelist = ListBoxEx.CreateImageList("Plugin1", 35);

if ( bImagelist ) then

   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon2.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon3.ico");

   ListBoxEx.SetImageList("Plugin1");

end


ListBoxEx.SetDefaultFont

ListBoxEx.SetDefaultFont (

(string) ObjectName,

(string) Font Name,

(number) Font Size,

(number) Font Weight,

(boolean) Italic,

(boolean) Underlie,

(boolean) StrikeOut )

(number) FontColor )

Description

Sets the font of a ListBoxEx object with the specified characteristics.

Parameters

ObjectName

(string) The name of the object.

Font Name

(string) Identifies the Font Name

Font Size

(number) Identifies the Font size

Font Weight

(number) Identifies the Font weight

Italic

(boolean) Identifies the italic Font or not

Underlie

(boolean) Identifies the underline Font or not

StrikeOut

(boolean) Identifies the strikeout Font or not

FontColor

(number) Identifies the font color

Returns

This action dose not return any value.

Example:

   ListBoxEx.SetDefaultFont("Plugin1", "Arial", 10, FW_BOLD, true, false, false,0);


ListBoxEx.SetColors

ListBoxEx.SetColors (

(string) ObjectName,

(number) Back,

(number) Items,

(number) Selection,

(number) Grid )

Description

Sets colors of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Back

(number) The background color of ListBoxEx object( use -1 for ignore ) .

Items

(number) The background color of ListBoxEx items ( use -1 for ignore ) .

Selection

(number) The background color of selected ListBoxEx item ( use -1 for ignore ) .

Grid

(number) The grid lines color of a ListBoxEx object( use -1 for ignore ) .

Returns

This action dose not return any value.


ListBoxEx.SetCheckBoxImages

ListBoxEx.SetCheckBoxImages (

(string) ObjectName,

(number) ImageList,

(number) TransparentColor )

Description

Renews the image list of check boxes.

Parameters

ObjectName

(string) The name of the object.

ImageList

(number) The path to image list file (32x16 bmp image with 16x16 two cells).

TransparentColor

(number) The transparent color of new image list .

Returns

This action dose not return any value.


ListBoxEx.ReplaceIcon

ListBoxEx.ReplaceIcon (

(string) ObjectName,

(number) IconIndex,

(string) NewIcon )

Description

Replaces an icon in previously created image list with new one.

Parameters

ObjectName

(string) The name of the object.

IconIndex

(number) The index of icon in image list.

NewIcon

(string) The path to new icon file.

Returns

This action dose not return any value.


ListBoxEx.Redraw

ListBoxEx.Redraw (

(string) ObjectName )

Description

Redraws a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

This action dose not return any value.


ListBoxEx.GetStyle

(table) ListBoxEx.GetStyle (

(string) ObjectName )

Description

Gets the style table Of a ListBoxEx object. .

Parameters

ObjectName

(string) The name of the object.

Returns

(table) returns a table with indexes Icons,Grid,CheckBoxes

Table Indexes:

Icons:

(boolean) if true icons are visible . if false icons are invisible.

Grid:

(boolean)  if true grid is visible . if false grid is invisible.

CheckBoxes:

(boolean)  if true check boxes are visible . if false check boxes are invisible.

returns nil if an error occurs

Example:

tblStyle = ListBoxEx.GetStyle("Plugin1");

if (tblStyle ~= nil) then

   if (tblStyle.CheckBoxes == true) then
      Dialog.Message("Notice", "Check Boxes Are Visible");
   end

end


ListBoxEx.GetItemColor

(table) ListBoxEx.GetItemColor (

(string) ObjectName,

(number) Index )

Description

Gets the color of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

Returns

(table) returns a numerically indexed table that contains color value(s)
if specified item uses default color returns result[1] = -1
if an error occurs the return value is nil

Example:

result = ListBoxEx.GetItemColor("Plugin1", 2);

sz_string = "";

if (result ~= nil) then

      if (result[1] == -1) then
          Dialog.Message("Notice", "This Item Uses Default Color..");
      else
        min = 1;
        max = Table.Count(result);
           for count = min, max do

              sz_string = sz_string..result[count].."\r\n"
           end

           Dialog.Message("Notice", sz_string);
       end
else
 Dialog.Message("Notice", "Error..");
end


ListBoxEx.GetColors

(table) ListBoxEx.GetColors (

(string) ObjectName )

Description

Gets colors of a ListBoxEx object .

Parameters

ObjectName

(string) The name of the object.

Returns

(table) returns a table with indexes Back , Items , Selection , Grid

Back:

(number) Background color of object.

Items:

(number) Default background color of items.

Selection:

(number) Selection color of items.

Grid:

(number) Color of grid dividers.

returns nil if an error occurs

Example:

tblColors = ListBoxEx.GetColors("Plugin1");

if (tblColors ~= nil) then

  Dialog.Message("Notice", "Decimal Back Color Value Of Plugin Is : "..tblColors.Back);

end


ListBoxEx.CreateImageList

(boolean) ListBoxEx.CreateImageList (

(string) ObjectName,

(number) Size )

Description

Prepares a image list for a ListBoxEx object.

Note : You Can Call This Action Only Once . Please use this action in On Create event of plugin ,as shown in sample project(s)

Parameters

ObjectName

(string) The name of the object.

Size

(number) The size (cell width) of each icon in image list. This value should between 16 - 128

Returns

(boolean) returns true on succeed false on failed

Example:

bImagelist = ListBoxEx.CreateImageList("Plugin1", 35);

if ( bImagelist ) then

   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon2.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon3.ico");
   ListBoxEx.SetImageList("Plugin1");

end


ListBoxEx.AddIcon

ListBoxEx.AddIcon (

(string) ObjectName,

(string) Icon )

Description

Adds an icon to a previously created image list.

Parameters

ObjectName

(string) The name of the object.

Icon

(string) The path to icon file.

Returns

(number) returns the index of last added icon , if an error occurs return value is -1

Example:

bImagelist = ListBoxEx.CreateImageList("Plugin1", 35);

if ( bImagelist ) then

   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon2.ico");
   ListBoxEx.AddIcon("Plugin1", "AutoPlay\\Icons\\Icon3.ico");
   ListBoxEx.SetImageList("Plugin1");

end


ListBoxEx.SetCheckListStyle

ListBoxEx.SetCheckListStyle (

(string) ObjectName,

(boolean) Enable )

Description

Sets ListBoxEx like a check list ,When this enabled user can check or uncheck items via clicking anywhere of item .
Simly converts ListBoxEx items to individual checkboxes.
Note : When this style is enabled only 'On CheckBox ' event fires then user selects an item.

Parameters

ObjectName

(string) The name of the object.

Enable

(boolean) Whether to make the check list style enabled or disabled.

Returns

This action dose not return any value.


ListBoxEx.SetAcceptFiles

ListBoxEx.SetAcceptFiles (

(string) ObjectName,

(boolean) Enable )

Description

Enables or disables whether ListBoxEx accepts dropped files. (disabled by default)

Parameters

ObjectName

(string) The name of the object.

Enable

(boolean) The state of whether ListBoxEx accepts dropped files

Returns

This action dose not return any value.


ListBoxEx.GetCheckListStyle

(boolean) ListBoxEx.GetCheckListStyle (

(string) ObjectName )

Description

Gets whether check list style enabled or disabled.

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if check list style is enabled. and false if it is not


ListBoxEx.GetDroppedFiles

(table) ListBoxEx.GetDroppedFiles (

(string) ObjectName,

(boolean) Clean )

Description

Returns a numerically indexed table that contains the dropped file/folder paths.

Parameters

ObjectName

(string) The name of the object.

Clean

(boolean) if true this action cleans dropped file list in memory, if false dropped file list stays in memory until next drag and drop operation

Returns

(table) returns a numerically indexed table containing file/forlder paths that dropped by user
returns nil if there is no list available ,or list removed by previous call of this action

Example:

tblDropList = ListBoxEx.GetDroppedFiles("Plugin1", true);

if (tblDropList ~= nil ) then

for j, file_path in tblDropList do

   ListBoxEx.InsertItem("Plugin1", file_path, file_path, nIconIndex, HTML, 0, nil, nil);

end

end


ListBoxEx.GetAcceptFiles

(boolean) ListBoxEx.GetAcceptFiles (

(string) ObjectName )

Description

Gets the state of whether ListBoxEx accepts dropped files.

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if ListBoxEx Accepts files/Folders. and false if it is not


ListBoxEx.FindData

(table) ListBoxEx.FindData (

(string) ObjectName,

(string) Text,

(number) Field )

Description

Finds specified text in Data or ExData fields of ListBoxEx items.

Parameters

ObjectName

(string) The name of the object.

Text

(string) The text to be looked for

Field

(number) The field to be looked in

CONSTANT | VALUE | DESCRIPTION
FIND_DATA | 0 | Find string in data fields
FIND_EXDATA | 1 | Find string in extra data fields

Returns

(table) returns a numerically indexed table containing item indexes which are matching to specified text
returns nil if specified text was not found

Example:

found_items = ListBoxEx.FindData("Plugin1", "Hello" , FIND_DATA);

if (found_items ~= nil) then

  ListBoxEx.EnsureVisible("Plugin1", found_items[1]);
  ListBoxEx.SelectItem("Plugin1", found_items[1], true);

end


ListBoxEx.GetItemDataEx

(string) ListBoxEx.GetItemDataEx (

(string) ObjectName,

(number) Index )

Description

Gets the extra data of specified item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(string) Returns Extra Data Of Item If Exist ,Or Empty String "" If It Is Not


ListBoxEx.SetItemDataEx

ListBoxEx.SetItemDataEx (

(string) ObjectName,

(number) Index,

(string) ExtraData )

Description

Sets the extra data for an item in a ListBoxEx object.this action can be useful for grouping or separating items

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

ExtraData

(string) The new extra data for specified item.

Returns

This action dose not return any value.


ListBoxEx.GetItemVisible

(boolean) ListBoxEx.GetItemVisible (

(string) ObjectName,

(number) Index )

Description

Gets the Visibility state of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

Returns

(boolean) Returns true if item is visible ,and false if it isn't


ListBoxEx.SetItemVisible

ListBoxEx.SetItemVisible (

(string) ObjectName,

(number) Index,

(boolean) Visible )

Description

Sets the Visibility state of an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The index of item.

Visible

(boolean) The visibility state of an item

Returns

This action dose not return any value.


ListBoxEx.SetPos

ListBoxEx.SetPos (

(string) ObjectName,

(number) X,

(number) Y )

Description

Sets the position of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

X

(number) The new X position of object.

Y

(number) The new Y position of object .

Returns

This action dose not return any value.


ListBoxEx.SetSize

ListBoxEx.SetSize (

(string) ObjectName,

(number) Width,

(number) Height )

Description

Sets the size of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Width

(number) The new width of object.

Height

(number) The new height of object .

Returns

This action dose not return any value.


ListBoxEx.GetPos

(table) ListBoxEx.GetPos (

(string) ObjectName )

Description

Gets the position of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

(table) returns a table containing object position
table indexes are : X and Y
returs nil if an error occurs


ListBoxEx.GetSize

(table) ListBoxEx.GetSize (

(string) ObjectName )

Description

Gets the size of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

(table) returns a table containing object dimensions
table indexes are : Width and Height
returs nil if an error occurs


ListboxEx.SetUpdate

ListBoxEx.SetUpdate (

string ObjectName,

boolean Enabled )

Description

Sets the enabled/disabled update state of a listbox object. The update state controls whether or not the listbox object will be redrawn to reflect any changes that have been made.

Note: When a ListboxEx object's update state is disabled, any actions to modify it will not be visible to the user until this action is called to enable the update state.

Parameters

ObjectName

(string) The name of the object.

Enabled

(boolean) Whether to make the ListboxEx object's update state enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. ListBoxEx changes are immediately visible. (Default)
false | Disabled. ListBoxEx changes are not visible until it's update state is enabled.

Returns

This action dose not return any value.


ListBoxEx.CheckAllItems

(number) ListBoxEx.CheckAllItems (

(string) ObjectName,

(boolean) Checked )

Description

Checks or unchecks all items in a ListBoxEx object and returns number of items checked/unchecked.

Parameters

ObjectName

(string) The name of the object.

Checked

(boolean) checks all if true unchecks if false.

Returns

(number) returns number of items checked/unchecked.

Example:

result = ListBoxEx.CheckAllItems("Plugin1", true);
Dialog.Message("Notice", "Total "..result.." Item(s) Checked");


ListBoxEx.IsVisible

(boolean) ListBoxEx.IsVisible (

(string) ObjectName )

Description

Determines whether specified object is visible or not.

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if specified object is visible. and false if it is invisible


ListBoxEx.IsEnabled

(boolean) ListBoxEx.IsEnabled (

(string) ObjectName )

Description

Determines whether specified object is enabled or not.

Parameters

ObjectName

(string) The name of the object.

Returns

(boolean) retruns true if specified object is enabled. and false if it is disabled


ListBoxEx.SetVisible

ListBoxEx.SetVisible (

(string) ObjectName,

(boolean) Visible )

Description

Sets the visibility of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Visible

(boolean) Whether to make the ListBoxEx object visible or invisible.

Returns

This action dose not return any value.


ListBoxEx.SetEnabled

ListBoxEx.SetEnabled (

(string) ObjectName,

(boolean) Enable )

Description

Sets the enabled/disabled state of a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Enable

(boolean) Whether to make the ListBoxEx object enabled or disabled.

Returns

This action dose not return any value.


ListBoxEx.GetTotalItems

(number) ListBoxEx.GetTotalItems (

(string) ObjectName )

Description

Gets the total items in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

(number) returns number of items that ListBoxEx contains. returns 0 if no item


ListBoxEx.DeleteAllItems

ListBoxEx.DeleteAllItems (

(string) ObjectName )

Description

Deletes all items in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

This action dose not return any value.


ListBoxEx.Find

(table) ListBoxEx.Find (

(string) ObjectName,

(string) Text )

Description

Finds specified text in ListBoxEx items.

Parameters

ObjectName

(string) The name of the object.

Text

(string) The text to be looked for

Returns

(table) returns a numerically indexed table containing item indexes which are matching to specified text
returns nil if specified text was not found

Example:

found_items = ListBoxEx.Find("Plugin1", "Hello");

if (found_items ~= nil) then

  ListBoxEx.EnsureVisible("Plugin1", found_items[1]);
  ListBoxEx.SelectItem("Plugin1", found_items[1], true);

end


ListBoxEx.InsertItem

(number) ListBoxEx.InsertItem (

(string) ObjectName,

(string) ItemText,

(string) ItemData,

(number) IconID,

(number) Style,

(number) ItemHeight,

(table) ItemColor )

(table) HighLightColor )

Description

Inserts an item to a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

ItemText

(string) The text for item.

Possible HTML tags are : <br> <b> <u> <em> <i> <p> <strong> <sub> <sup> <font color=#XXXXXX>

ItemData

(string) The data for item.

IconID

(number) The icon id for item.

Style

(number) The style of item.

VALUE | DESCRIPTION
HTML | Html Text (item text will be drawn as HTML )
NORMAL | Normal text ( item text will be drawn as normal text with default font )

ItemHeight

(number) The height of item ( set 0(zero) for autosize).

ItemColor

(table) The Item color table ,a numerically indexed table that contains color values
if table contains more than one index a gradient effect will be applied,
if table contains one index a plain back color will be applied
if this argument is nil , default item color will be applied

this table may contain maximum 30 indexes..

HighLightColor

(table) The Item's highlight color table ( Same as ItemColor above ).

Returns

(number) returns number of index that item is added

Example:

min = 1;
max = 15;
for count = min, max do

    ItemText = "<b>Hello World <font color=#FF0000>"..count.."</font></b>"
    ListBoxEx.InsertItem("Plugin1", ItemText, "test "..count, 1, HTML, 0, {16316664,16764057,16764057});

end


ListBoxEx.SelectItem

ListBoxEx.SelectItem (

(string) ObjectName,

(number) Index,

(boolean) Event )

Description

Selects an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Event

(boolean) whether On Select event will be triggered.

Returns

This action dose not return any value.


ListBoxEx.SelectNone

ListBoxEx.SelectNone (

(string) ObjectName )

Description

Clears current selection in ListBoxEx items.

Parameters

ObjectName

(string) The name of the object.

Returns

This action dose not return any value.


ListBoxEx.GetItemText

(string) ListBoxEx.GetItemText (

(string) ObjectName,

(number) Index )

(boolean) RemoveTags )

Description

Gets the text of specified item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

RemoveTags

(boolean) Whether clean HTML tags (if exist) in item text.

Returns

(string) returns text of specified item if it is exist , returs "" if an error occurs or text does not exist


ListBoxEx.EnsureVisible

ListBoxEx.EnsureVisible (

(string) ObjectName,

(number) Index )

Description

Ensures that specified item is visible.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

This action dose not return any value.


ListBoxEx.DeleteItem

(boolean) ListBoxEx.DeleteItem (

(string) ObjectName,

(number) Index )

Description

Deletes an item from a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(boolean) returns true on succeed false on failed


ListBoxEx.GetItemCheck

(boolean) ListBoxEx.GetItemCheck (

(string) ObjectName,

(number) Index )

Description

Determines whether specified item's check box is checked.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(boolean) returns true if item is checked false if it is not


ListBoxEx.GetItemData

(string) ListBoxEx.GetItemData (

(string) ObjectName,

(number) Index )

Description

Gets the data of specified item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Returns

(string) returns data string of specified item if it is exist , returs "" if an error occurs or data does not exist


ListBoxEx.SetItemCheck

ListBoxEx.SetItemCheck (

(string) ObjectName,

(number) Index,

(boolean) Checked,

(boolean) Event )

Description

Sets check box of item is checked or unchecked.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Checked

(boolean) The boolean status of check box.

Event

(boolean) whether On CheckBox event will be triggered.

Returns

This action dose not return any value.


ListBoxEx.SetItemText

ListBoxEx.SetItemText (

(string) ObjectName,

(number) Index,

(string) Text )

Description

Sets a new text for an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Text

(string) The new text for specified item.

Returns

This action dose not return any value.


ListBoxEx.GetSelectedItem

(number) ListBoxEx.GetSelectedItem (

(string) ObjectName )

Description

Gets the index of selected item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

(number) returns index of selected item . returns 0 if an error occurs or none selected

Example:

nSelected = ListBoxEx.GetSelectedItem("Plugin1");

if (nSelected == 0) then

  Dialog.Message("Notice", "Please Select An Item From ListBox");

end


ListBoxEx.SetItemData

ListBoxEx.SetItemData (

(string) ObjectName,

(number) Index,

(string) Data )

Description

Sets a new data for an item in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Index

(number) The item index.

Data

(string) The new data for specified item.

Returns

This action dose not return any value.


ListBoxEx.GetCheckedItems

(table) ListBoxEx.GetCheckedItems (

(string) ObjectName )

Description

Gets the checked items in a ListBoxEx object.

Parameters

ObjectName

(string) The name of the object.

Returns

(table) returns a numerically indexed table containing item indexes which are checked
returns nil if no item checked

Example:

checked_items = ListBoxEx.GetCheckedItems("Plugin1");

if (checked_items ~= nil) then

  ListBoxEx.EnsureVisible("Plugin1", checked_items[1]);
  Dialog.Message("Notice", "Total "..Table.Count(checked_items).." Item(s) Checked");

end