Two combos logic (Mutually exclusive combo boxes)
-
@hisefilo Can you explain more?
-
In the callback for each combo box you update the list of items in the other box.
-
@d-healey @ulrik Yes that was my first idea but as arrays uses index and not IDs I can remove or push into the array the selected item.
HiseSnippet 1336.3oc6Y01aaaCDlJ1pMVcqncn.a.6KBF6CNnoo1tYu.jsUm3jLDrlWPbRPA5JJXjnsYCEoFEUVMJx+w8So+C1NRIaImn35301Oz4juDdGuiO2wiO2YmCjBORTjPhrpbzfPBx5Kr6Lfq52tOlxQ6rIx5t16hiTDoahnMFDhihH9HKqR+lVfUkxHyOu6oafYXtGISDBchf5QdFMfpxjdPqemxXai8IGQCxs6Uasimf2VvDw.dJYWGEh8NC2irGVusErQV2ZKepRH6nvJRDxp7FB+Ac5K9Kdx9OgFQOkQzKZf5.NJQ71BluFw5+F0tOk4evv3NBgrt8AYYgRIYgGXuK0mNRdV13dFEtYVjOeXsv3vqzXvqw0AuBfjUNHUNAR22timjFpxznwycr2gCWNcwPZOOTR1KZgusrcaArCtZk.7YjskvhQVTa050W1sY85KsliiCj6iTtmiktAB+XFIx8WbeQUgDy6Qptra0Xljdl9O7WoOAyHCp9x0xaUaQvohMDuoAX2vyrGQAhCEbXQspi1QU3.upgMeuF1TanyH2rRDATRUjfHMtzJuFcoQzJuVP40p9G7pKk2QMmfiZNcNhGIXjUBkT.tYlBQwIXVLolYWTNixItci4dJpf6pq0SQqNrkBVMugw7xPlALbIm25TgI7vLWJjcpulSE8ucER2Zz0.Y+7HDwH7dp9frG9vkdKrmJO9wtoUDQtXFa3FAMlW3lTrtvyrpVp1WPe4R5HdXsTsF.xqbg9PA+cTrjGA31U0m3FQXDOEwWu1DHMblnmMAziZbI+ap8z99PRf3b.pWx0P9RJBbwRIdfSkgAqzr4q55TecbnO7Bz0boog9M5x7hjKzIW+pcT5kVaH4dJPTU6p2ml2U4tu2SnH6yqYtUctvw8xp51sPcodiQjEpVyhJmjg03wAmRj4qozaDnVFmu5VSGekWRxI2FE7c3T09gjz0YDtMJfcCklcAdtERQHrUkgk6dorbCyjHpuljaThEYBgrdFK1BcCcQyK6BTKzw6rIVg07toPCfaHQpn5rh0ljyglXIrvUr2jDclRDZvdZkAj4lRz+lricyVCxV7qsBvfNaqRvBS4Ix5qsS3dcLDuNCYc0ouQmq8TFxYmaqWO94ldXN1Y9+p8dftd5mJX03sB08+SU.0ai0+Q2igGQUCxOevk6OV95q2pWX66BqllR3de6CnJu9Ei2EJ.u5xyOx3McZiuzdqtcABuLvV1d6mOwQK9fCk6l.k6X2A5QYHtM.YwzhvIL22eOsy8EN0y8sumBeN4H3jiBEQi43Nj.5QP0eTdgGGAS1P9yC02q4k2VfkEp5cOcaHLKzlNXUrzTfrdfHlqFqfnzTeKjmvb72I41eAS9U9i0vneRer8emanzzA22yryUFhwNzfPFYK94DFvrav3WAT4cwwL0PoMFCk6J3hv9BN0KeEvgDkj1qGQlG6EFPqqTvPAYRdPqCgoZv4ql+tVOCpBwRHOQlwbwM+yQT3802Xm.WW8KS2OO3zK8+SN8CEwJJu2tXnPUORwdwAc.hUOBfDNmvhziYrflbLYcc85DlUtuYw+.+jprgdsUpxFCUNE8MtssYpk4sMl213y81FMm21Xdai4sM9fz1H2GCM+mNadmi4cN9LrywSl24Xdmi4cNlhNGeJNi.rmT7JujuMYcs7hFIPbyM++GqXuqds6nuCZa65qTGE.LhuxySmteDjeJ1llyfMOYFrY0YvlueFr4GlAa9wYvleZh1naFsdrRDj7TDDbvVluHeKqs3XnR1T0i9W.z4zR8.
-
@hisefilo You can convert an elements text (id) to an index using indexof
-
hmmm I just tried putting together a quick example but it's trickier than I thought. I'll figure it out though because I need it for a project I'm working on. But I'm not going to be around much today so maybe someone else will get there before me.
-
@d-healey Yep, not simple for me at least. Need to save active item on the remaining combos and vice-versa (spaghettiiiiiiiiiiiiii)
-
This post is deleted! -
@ulrik man thank you so much. Your code looks so clean and pro!!!
Almost there. Remaining combo box resets and shows no text. But I guess I can fix that
Thanks once again for your help bro
-
This post is deleted! -
@hisefilo I didn't realize you wanted this combo combo to have a purpose as well , forget about the code it will not work,
Maybe this is more like what you need?HiseSnippet 1363.3oc6Y00aaaCEUx1JsVcqHcnOrG0L1CxHot1pYefksEm3jLDrlDi3zfAzUTvHSayFJRMIprXLz+i6mR+GrcIkjkbiiiiWZdHy4oxKu2KO7xi34R21AbWbXHOPSu7wC8wZ5elQmgLwfVCPDl1daqo+Xi8QgBbfUrosF5iBCwc0z0K9KRC5kKoo96CarEhhXt3LSZZmvIt3WR7HhLqsa9qDJcWTW7wDubduVy8b4rVbJOBvSQi5Z9H2yP8wGfjtUvPSeoc5RD7fNBj.GpoWZKd2gcFv+SVr+mPBImRwxAMz5.IJ17tbZWIhkV0ZMfP61NceGpoo+f1YUghwUgmZrOoKYj8rpwxpIrxhHe8Puv3vq3XvqQd3UOG7l.jzyAoRwP5IFcbCH9hrYj34QF6wfCmdHnrmGJw9pUfujQKN3ASTyCcFd2.XvnHrWqd8UsbpWu55lllPsOTXcNJvxi2MhhCs9IqWWgGfX8wUV0pRDMfbl7ezs1.LhhGV4MqmOpVbuS4awunADW5Z1GK.y9bFLvtxHOp.K3kCz4ZCzQFn4nzTKDCSRDXuPItjSdEykrip8NNgYW42YUplOQNSIQNyRhLILJggs5EwbEDNyRRiS.hbGEvo1toamUgMMMBW07uLKS4tHpkJ4pMeJ36mslUqE5SIh3Ea87g.Qnb40p78rFvwQYyx83AV1DXt5qaQr9wXWpQwr9hAfkUVopY4xpuwUEYI0SMxNNWj2TUtiS4R1h..pPhgLeUAMd.8PzPUDoPkKFfCRvaVUERydfsiwWHry1VTBvI.ZWtsBrWYokcIzoVeU791ZCk607iBGXSqZ8CvAWLPuhyNk2icvMtmmHKi1JuHrt3KNrm8HrWckFf+uWQZtFpsLUIG5sPT5ovcX1WlOHoMO+4Sg33LGDGm68DmF2IDmFyLwowsEww45HNN4HNl43KGvE3CY1JVg46Ms93o50ahykjMJNXhSKUlClVf1rHuSwA44jRGA4pw0.MtZMv7RztwEmbNxY6wHhC8wr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