[yast-devel] Deleting items from a selectionWidget
Hi All I am trying to delete a single item from a selection widget, but I am unable to find a solution to it directly atleast. -- Regards Manu Gupta -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 25.6.2011 16:04, Manu Gupta napsal(a):
Hi All
I am trying to delete a single item from a selection widget, but I am unable to find a solution to it directly atleast.
Hi, According the documentation [#1] [#2] [#3], you need to do this: UI::ChangeWidget (id, `Items, list_of_items); * id is the ID of your ComboBox widget * list_of_items is either list of strings (items) or list of terms // plain list of entries list <string> list_of_items = ["a", "b", "c"]; // list of entries with variable name (translations) and fixed ID list <term> list_of_items = [`item (`id ("a"), _("A")), ... ]; See also filter() [#4] function. PS: You also might need to remember the selected item and re-select it after removing that item you wanted to disappear. #1 http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/ComboBox.html #2 http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/ChangeWidget.html #3 http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/QueryWidget.html #4 http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/filter-list.html HTH Lukas - -- Lukas Ocilka, Appliances Department, SUSE LINUX s.r.o. MD: Jeff Hawn, Jennifer Guild, Alena Hendrichova -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iD8DBQFOCeuJVSqMdRCqTiwRAqpfAJ9CuANDLYlnph39KL3ZQRC2ir2BCACfZ1PU aAKcLRyitZWNHqPgoSFbiUU= =iWRC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Lukas Ocilka
-
Manu Gupta