Page 1 of 1

add item to combobox

PostPosted: Sun Oct 20, 2013 12:59 am
by dotchiejack
Hello,
First my native language is dutch, so forgive me if i make some mistakes.
I am brand new to neobooks and have a question. A have an inputbox and a combobox I would like that if you put a tekst in the inputbox it is saved in the combobox but i can't find the solution
Anybody an idee?

grtz

Dotchiejack

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 1:45 am
by CN_Iceman
It is very easy...

Code: Select all
InputBox "InputBox Title" "Message" "[Variable]"
ListBoxAddItem "ComboBox1" "0" "[Variable]"


Greetings.

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 2:01 am
by dec
Hello,

Welcome to NeoBook! Jose's answer is correct if you use an "InputBox" action to retrieve the text to be entry into the ComboBox. If you want to use the text stored in a "TextEntry" object, you can use the same action "ListBoxAddItem" specifiying the "EntryBox" variable.

Supose you have an "EntryBox" object named "MyTextEntryBox". Probably the associated variable, that store the content of the "EntryBox" is named "[MyTextEntryBox]". Then you can use the "LisBoxAddItem" action in this manner:

Code: Select all
ListBoxAddItem "ComboBox1" "0" "[MyTextEntryBox]"


Take a look at the "Objects" action's category. Here you can found various actions related to "Listbox and ComboBox" objects. Also do not forget the NeoBook help. In every action dialog you can found a Help button who link you to the appropiate section in the help file.

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 2:14 am
by CN_Iceman
Sorry about my short answer... it was from my phone. :roll:
I was using only my memory, you know.
David always giving us a hand.
Greetings.

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 2:24 am
by dec
Hello,

CN_Iceman wrote:Sorry about my short answer... it was from my phone. :roll:
I was using only my memory, you know.
David always giving us a hand.
Greetings.


No worries Jose! Your answer is absolutely correct when we want to use an "InputBox" action. ;)

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 2:32 am
by dotchiejack
Thank you for the quick answer

I will give it a try now

Thanks

Dotchiejack

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 2:47 am
by dotchiejack
Hello,

the code from iceman works perfect, so up to the next obstacle, my wife wants we to create a fully adjustable recipebook, so i guess that there will be a few problems ahead of me.
This problem is solved

Thanks

Dotchiejack

ps: must i set this topict on solved, and how?

Re: add item to combobox

PostPosted: Sun Oct 20, 2013 7:48 am
by CN_Iceman
Try editing your first post and edit the topic.
Greetings.