I have created a combox in a table using syntax similar to that below
TABLE1.cellWidgetRC(1, "Column2", "ComboBox", makeDynString(true, "English", "Austrian","German")); }
I would like to now either set the value of the combo box or get the value of the box.
I normally use the statement
setValue(comboBoxName, "selectedText","newText);
But in this case I do not know what the name of the combo boxes inserted with the cellWidgetRC funtion.
Help!
Thanks.
Using combox box in a table via cellWidgetRC
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
Using combox box in a table via cellWidgetRC
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Using combox box in a table via cellWidgetRC
Simply set the value of the cell to one of the values in the combo, e.g.
TABLE1.cellValueRC(1, "Column2", "Austrian");
TABLE1.cellValueRC(1, "Column2", "Austrian");
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
Re: Using combox box in a table via cellWidgetRC
Thank you. I am aware that I can do that to write to a value but then the user can still type something over the combo box choises.. Is there a command to not make a cell editable. I can't use columEditable because I need to keep other combo boxes in the same column editable.
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Using combox box in a table via cellWidgetRC
make the combo non-editable.
E.g. TABLE1.cellWidgetRC(1, "Column2", "ComboBox", makeDynString(false, "English", "Austrian","German"));
E.g. TABLE1.cellWidgetRC(1, "Column2", "ComboBox", makeDynString(false, "English", "Austrian","German"));
- lakefalos
- Posts:27
- Joined: Thu Feb 01, 2018 3:13 pm
Re: Using combox box in a table via cellWidgetRC
OK. Thanks