How to simply set index value of a dropdown list?
Answered
Hi Markus and developers,
In order to develop some applications with the spreadsheet (see here) I am looking for a way to simply adjust the index of a dropdown list at any position. :confused:
It seems that a command of the following type for one or several cells is missing:
SetIndexValue[<list>,n] » or «SetIndexValue [{<liste1>, …, <listep>},n]
In fact “miir” (Michel) already proposed a workaround with Javascript, but is difficult to implement and slows down the application for a large amount of cells: :?
http://www.geogebra.org/for...
Another suitable thing is to make the dropdown list available in Html5 format, if possible. :D
Thank you in advance for your attention to my requests.
Best regards.
Phil
Hi,
SetValue[list,k]
does that -- at least SelectedElement
Cheers,
Zbynek
Hi Zbynek,
As Noël said, that is very surprising (and a very good surprise)! :DHowever, we can’t apply the command to a range of cells: If you want to initialize a wide table, it will be painful. Thus, I think something is still missing. :?
Thanks again your answer.
And what about dropdown lists? Are they planned for future versions in Html5 format? :confused:
Best regards,
Phil
Hi,
if you export to HTML5, dropdown list should be visible. Possibility to create a new dropdown list using the HTML5 app is also planned.
To do this for range of cells, you still need to use a for loop in JavaScript, but at least you can avoid the scary and sluggish XML tricks.
@Noel: I think it's OK to have SetValue command for this as GeoGebra can make a difference between SetValue[list, number] and SetValue[list, other_list].
Cheers,
Zbynek
hello
i have tried SetValue[<list>,<number>,<object>] as in help . i think there is a bug, bad help or i do not understand it
ver4.2 and 4.4
saludos
Hi,
Sorry but as you can verify below: dropdown lists are not visible in HTML5 format (you can also switch to the java version to observe the difference):http://tube.geogebra.org/st...
Or is there another surprise? :confused:
@mathmagic: the command SetValue[<list>,<number>,<object>] is different and is used mainly to add an object at a defined position in a free list.
Cheers,
Phil
Hi,
now I realised you refer to dropdown lists in spreadsheet -- you are right, those are not implemented and we plan to add them. Meanwhile you can use dropdown lists in graphics view, though I can guess they are not too helpful for applet where you need 20 of them.
Cheers,
Zbynek
Hi,
Thanks to consider the request. :DYou’re right. The application for a final educational test will have more than a hundred cells. I therefore expect with impatience future improvements. :wink:
Cheers,
Phil
Is there any news about simple method to find the index values with a dropdown list? I've searched to see if there is method I could use...
My workaround is as follows...
funcList0={"Linear","Square","Square Root","Absolute Value"}
funcList1 = {x,x²,sqrt(x),abs(x)}
indexFunc=SelectedElement[funcList0]
f(x)=Element[funcList1,IndexOf[indexFunc,funcList0]]
Tony
https://ggbm.at/568135
I need to have the use the position on indexLess to locate the correct element of listLesson to complete this lesson...
Tony
https://ggbm.at/568139
@acron:
Hi Tony,
I think that you mixed up index and element.
The syntax of the IndexOf-command is
IndexOf[ <Object>, <List> ]
so your defintion
must fail as it does not conform to the syntax.I've changed your file (changes in Magenta)
https://ggbm.at/568145
so that it fullfills the expectations I suppose you expect it to fullfill :) .
Gerhard
Thanks, after reviewing your file, my main problem was not knowing the SelectedIndex...
File is working well now...
Tony
Comments have been locked on this page!