[PLUGIN] ComboBox & ListBox

Post your completed addons to share with the community

Post » Sat Dec 10, 2011 2:13 am

Hey, here is my first released plugin. Whooow, what an experience !
I didn't know programing javascript three weeks ago, so please be indulgent with me.
I tried to do something clear and structured though. I hope it is.

Feel free to suggest ideas/request about functionnalities of this plugin. I'm actually working on the next version.

Thanks all, and hope this will be usefull.
(I'm french, and even if I work every days with american guys, my english may be not so good. Sorry for that.)


Combo Box & List Box
Version: 2.43 (21/01/2013)
Tried in Internet Explorer 9.0.3 / Opera 11.51 / Chrome 15.0.874 (issue) / Safari 5.1.2 (issue) / Firefox 8.0 / Mobile Safari (iOS 4)


Download the plugin.


PARAMETERS.
By default, the ComboBox object is without tooltip, enabled, black font color, white background color, width : 200px, height : 25 px.

Tooltip Set the text of the tooltip.
Enabled Choose wether the combo box is enabled or disabled on startup.
Font color Choose color for the font.
Background color Choose color for the background.

ACTIONS.
COMBO.
Change tooltip Set or change the text of the tooltip.
Set enabled Change the parameter 'Enabled' to enabled or disabled.
LINE.
Add a line(text) Add a new line at the last position (ID starts from 1).
Change a line(text, ID) Change the text of the line by its ID.
Delete a line(ID) Delete a line by its ID (decrements ID values).
Tips. Set 'all' (without quotes) to delete all lines.
Insert a line(text, ID) Insert a line after another line choose by its ID.
Select a line(ID) Select a line (focus) by its ID.

CONDITIONS.
GENERAL.
1.1 Is a line selected(ID) Check if a line is selected by its ID.
1.1 Is enabled Check if the comboBox is enabled.

EXPRESSIONS.
GENERAL.
getTextById(ID) Return a string for the text of a line by its ID.
Set the ID in the expression (instead of 'ID of the line:').
getTextSelected Return a string for the text of the current selected line.
getTotalLines Return a number for the total number of lines.
getValueSelected Return a number for the ID of the current selected line.


TODO List for this plugin.
- Propertie/Action, Text alignment.
- Propertie/Action/Expression, Bold, Italic, Underline options.
- Action, Focus on last created line.
- A french version.

Feel free to let me know your suggestions, requests and corrections (as about language) as well as any bug report.
Enjoy ;)
septeven2013-01-21 11:48:57
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Mon Dec 12, 2011 2:40 pm

Thanks!!!
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Mon Dec 12, 2011 11:12 pm

Great plugin.
B
40
S
14
G
11
Posts: 243
Reputation: 9,432

Post » Sun Dec 18, 2011 1:14 am

It would be good if this plugin fired an event when a selection was made.

Jason
B
18
S
7
G
5
Posts: 62
Reputation: 4,410

Post » Sun Dec 18, 2011 7:26 pm

@smitchell @tonycrew Thanks both you guys!
@blueFire I'll add it ;)
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Sun Dec 18, 2011 8:10 pm

@septeven, Can you let me know when you implement the feature blueFire requested, I would be interested in this too!
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sun Dec 18, 2011 8:23 pm

@smitchell it will be announced here
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Sun Dec 18, 2011 8:27 pm

Ooooh Ok thanks! :)
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 20, 2011 12:14 am

@smitchell @blueFire

Changelog v1.1
[Add] CONDITIONS. Is a line selected ?
[Add] CONDITIONS. Is enabled ?

Btw, I didn't figure out to fix the issue with safari/chrome. Please, feel free to take a look and contact me if you find the solution, I'm not sure ton solve it quickly...septeven2011-12-20 00:18:01
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Tue Dec 20, 2011 2:53 am

Creating the ComboBox with a right click event at runtime seems to cause an extra contextual menu to display when the ComboBox is created.

There is another thread dealing with this issue at http://www.scirra.com/forum/topic47253.html where you can find an example. It only happens when the ComboBox is created with a right click and not a left click.

Is it possible to fix it where the contextual menu does not display?

Jason
B
18
S
7
G
5
Posts: 62
Reputation: 4,410

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests