Page 1 of 1

ListBox & ComboBox Variable contains

PostPosted: Wed Dec 12, 2007 3:30 pm
by smartmedia
Hi...

In some cases i need from a listbox or combobox to take both (item number & item text), so when i select the fisrt one for example, to be able to take 2 vars insted of 1. So if the var will hold is [TextEntry1] will genarate two vars, or better be able the user choose every var for num & text.

Thanks

PostPosted: Wed Dec 12, 2007 4:49 pm
by Neosoft Support
I'm sorry, I don't understand your suggestion.

PostPosted: Wed Dec 12, 2007 5:15 pm
by Gaev
smartmedia:

If you are asking that the same ListBox or ComboBox to (sometime) return values in Variable: (to store selected item) as Item number and at (other) times to return Item text ... please note that you can accomplish this by setting this property at Design time to Item number ... and when you want the associated Item text ...
Code: Select all
ListBoxGetItem "ListBox1" "[ListBox1]" "[ListBox1Text]"


@ NeoSoft Support - perhaps, in future the ListBox/ComboBox objects could be setup so ... if Variable: (to store selected item) was specified as [ListBox1] ... then additionally, [ListBox1.Text] and [ListBox1.Number] would also be automatically updated ... that way older applications can continue to use the current methods ... and newer applications (if so chosen by the developer) could just directly access one or the other desired value.

PostPosted: Thu Dec 13, 2007 10:05 am
by smartmedia
Hi...

Thanks Gaev,
@ NeoSoft Support - perhaps, in future the ListBox/ComboBox objects could be setup so ... if Variable: (to store selected item) was specified as [ListBox1] ... then additionally, [ListBox1.Text] and [ListBox1.Number] would also be automatically updated ... that way older applications can continue to use the current methods ... and newer applications (if so chosen by the developer) could just directly access one or the other desired value.


You have understand correctly what i want... Sorry again for my english.

PostPosted: Thu Dec 13, 2007 11:02 am
by Neosoft Support
Gaev, that's a good idea! I will add it to the list.

PostPosted: Mon Jul 14, 2008 2:16 pm
by phenix37
Neosoft Support wrote:Gaev, that's a good idea! I will add it to the list.

Good morning
I did not see this possibility in the new version Neobook.
It has been forgotten? Or perhaps that the amendment was too complicated.

PostPosted: Mon Jul 14, 2008 6:30 pm
by Neosoft Support
It's not too complicated, but it's inconsistent with how other NeoBook objects work. Currently, we have fields where you can choose the name of the variable you want to use. This is true for the List/Combo Box and almost all other objects.

I actually prefer the fixed [ObjName.VarName] option because it's clean and simple, but we can't change the current scheme without breaking all existing pubs. I suppose we could do a combination of both, but that seems kind of sloppy and confusing. Also using both methods would result in multiple variable for the same values. If you have a big publication this would double or triple the number of active variables.