zenity editable list help
I'm trying to use zenity in a bash script to display a .csv file using '--list' to allow the user to edit some of the values.
I can display it fine but i'm unsure how to edit the data? all i can get is whichever line is highlited when hitting ok on the zenity dialog to print. the data in the csv is arranged: <prod>,<disc>,<qty>,<type>,<location> Can anyone point me in the right direction? |
You need to use the '--print-column=ALL' option in order to print out the entire line you made edits to.
I suggest adding a hidden column that will act as a key and using the --seperator=, because you are using a CSV file. Your user cannot edit the key, so that way when you get the output on the command line, you can use that key as a common denominator with your CSV file to replace values. Example: Code:
zenity --list --editable --print-column=ALL --hide-column=1 --separator=, --column=key --column=prod --column=disc --column=qty --column=type --column=location 000 a ca ca ac ca 001 b cb cb cb cb 002 c cc cc cc cc Code:
001,bzzzz,cbzzzz,cbzzz,cbzzz,cbzzz |
All times are GMT -5. The time now is 07:33 AM. |