You can disable the itens of a combobox when saving the information of the combobox in a database
Announcement
Collapse
No announcement yet.
you can disable the itens of a combobox
Collapse
X
-
this code here will enable or disable the combobox.
-- Disable the ComboBox
ComboBox.SetEnabled("ComboBoxName", false);
-- Do something here
--[[your saving to database code here]]--
-- Enable the ComboBox
ComboBox.SetEnabled("ComboBoxName", true);
but if you want to disable the item then you need to do something to check what has been selected and then to check if its disabled. then dispaly an message if its disabled. or you can remove the item from the combobox if it disabled and re-add back to the combobox when enabled
-
Originally posted by supperbin View Postthis code here will enable or disable the combobox.
-- disable the combobox
combobox.setenabled("comboboxname", false);
-- do something here
--[[your saving to database code here]]--
-- enable the combobox
combobox.setenabled("comboboxname", true);
but if you want to disable the item then you need to do something to check what has been selected and then to check if its disabled. Then dispaly an message if its disabled. Or you can remove the item from the combobox if it disabled and re-add back to the combobox when enabled
the combobox if i know how to disable it, what i want is certain itbs of the combobox
Comment
Comment