Source language: Translate to:

ListBox and ComboBox basic code

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

ListBox and ComboBox basic code

Postby luka » Thu Jun 01, 2006 7:12 am

Please, I need basic code for ListBox and ComboBox (for example 3 item).

Thanks!
luka
 
Posts: 3
Joined: Thu Jun 01, 2006 7:02 am

Postby Neosoft Support » Thu Jun 01, 2006 9:53 am

The code depends on what you want your list box to do. Can you tell us more about what you're trying to do?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby luka » Thu Jun 01, 2006 11:09 am

Sory. I wish next: on mouse click go to any page number.

Thanks!
luka
 
Posts: 3
Joined: Thu Jun 01, 2006 7:02 am

Postby Neosoft Support » Thu Jun 01, 2006 6:03 pm

OK, create a list box and type the page numbers into the object's "list items" field like this:

1
2
3
4
5

Then make a note of the contents of the "variable to store selected item" field. Click on the "actions" icon on the left side of the list box properties screen. Then enter the following code into the editor:

GotoPageNum "[ListBox1]"

Replace [ListBox1] with the name of the variable used by your list box if different. The variable name can be found in "variable to store selected item" field.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby luka » Fri Jun 02, 2006 8:05 am

All is ok. Working. Very thanks for your time and lessons! I'm begginer in NeoBook. I need next code: on mouse click go to eny page neme?
luka
 
Posts: 3
Joined: Thu Jun 01, 2006 7:02 am

Postby Neosoft Support » Fri Jun 02, 2006 10:08 am

If you want the list box to contain page names instead of numbers, enter your page names in the "list items" field. For example:

Main
Introduction
Page 3
Page 4
Conclusion

Then change the left Click actions to this:

GotoPage "[ListBox1]"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest