Attach broadcaster to CB item click
-
@ustk said in Attach broadcaster to CB item click:
I am trying to get a broadcaster to react on item click.
All I get at the moment is when you click the actual combo box itself, not the items.Of course, the combo box callback can trigger for such an action, but not when there's only one item inside and it is already selected
I need a solution to trigger a function in that specific case
Do we need a specific broadcaster that reacts with items only?
or there's is a solution with what we have currently?HiseSnippet 928.3ocsVssZabDFdVYugraSKIPuo2MduRFDBozzjRKk5nUREkXYKpbCEJkvnYGocv6NyxLyZaQwua8QpuAI+ydRxwFGGAUWHz+4u+iilojTlVKUHGuyVmwPNOwc9ZgINLlvEnICQNei6Th1vT3RVCVmQzZVDxwYueyxvwaeTwm+6WGPRHBJaCKD5cRNkcLOka1vc1QukmjLlDwNimtk1u3nIToHTlHyA7rmaOTFgdNYE6DhUsVtHmGMJhajp4FhgoAcFHiVOOVdonT+2w07EILKQezbvQkrQgw7jnY04pFgb1e1lLeuxL+acmxi3M72TAdZg.7FK1tF3z59fT+u.H4rEj1uDROycNUwyLajXwyW4NQ.MjkDnTuMTJ0E05MsbCkfFBS2Tx4rwJfnwh1urWuNX3qC+YeeendqM3KHP2UltPNPdUe7ufqsdEy.ryjBfncPiFAehoCBAaFIVwErtTECpCCTRRDsXro8+36EviB9IbvDCKMLgSOmEEzA3RTqz.++JfVGjfN3.1E1e729WWDkAgcIFCgFelrAJSk4Z1HqZ51MfBrrv2Z7ohj0VGkZUCW3NcPiyhhNlC3R.HK3xX.qWvTVses.yA7giIZ7BFSfo0HEuLWPMboncCN6T51C8gjiurcAQ2JCNzy2CX6AEQsLg0MSwsUuImMZJN73IguczvCN3.Kf7ttJI8qi.VJNQZXmJZW3Z+q8wepnkKuSY1VlRlj.o0cI1tnotOCaKxSWvTcfFZRNqQQXR7li2O5gMdSKmf1RQoXhfaNMiUQOVlDYGas+91KCnpQP6ZQEBAUMEKEOsZont0i3Q1chlIATQJr8cIzeLYHwPpcF3WHVYLkgaSImgrKfiTkabdtCY5yMxrBcqZ2HmG+.C8UMg8eWbz5MXfezk7HSLxw0oiCBEy3qhMVpmaEByc.N9N2wvjIFhmZsulAkvnRBTJ4JqtsJNddqiDv4IYTdBwbyaV1iyUBfN8MNTXOFHzby5sKReAGx5cuGxdnP7Yty3FZ7ciwV2AFg92+GXr57+W6NZ4RF0rAf66N9O20a8elv+6xbCWrZJwn31d6I4oygW8nLH5BAKQW2uqn6YosUf4LQTAwGfOUB6aocpD1uVHL0PUx2SK2drOv73BN.lDEum5AOrCz3asvfPov6cumRuoqtkgOeWM762UCewtZ3OrqF9xc0vWsqF9iedCs+cjWmajokqMHzzYiJNv43LRPfIvhoUzGAitGvMC
Have you tried - in the comboBox callback setting the comboBox value =0... I think I recall this makes the comboBox CB active even if you select the only item in it...
-
@Lindon Unfortunately in that case the item is not shown as selected anymore
-
@ustk can you elaborate why you need this? Usually you never need to retrigger the callback with the current value so it might be better for your use case to use a different solution altogether.
-
@Christoph-Hart Of course
Once I select an item, I perform a few things, then I show a specific panel.
This panel can be closed/replaced by another one
If I select another item, the panel shows again as it should
However this doesn't work for the currently selected item, so I had to add a button just for this edge case, and the user will be confused. -
@ustk said in Attach broadcaster to CB item click:
This panel can be closed/replaced by another one
Can you put your combo box into a default state when this happens?
-
-
I could build my own cb using panels but I have so much to rework for this...
If a broadcaster is not interesting here for anyone else then I might go down the panel route, otherwise I can wait a wee bit :smiling_face_with_halo: -
Can you make a little snippet that demonstrates the setup?
-
@d-healey here ya go
HiseSnippet 1207.3ocsWstSibCE1SfAQR6RYk5CfE+JHQyBa2tsRUUkMWfFsjKJI6R29mcclwIiKyXOx1CPTEuZ8MouC8Mfd7bIYBjDfHZ9QTN2r+Ne93iOoqT3PUJgDYUbvjPJx5qs6Ogq8p4QXbTy5HqcraQTZpDmnp5jPhRQcQVVabpQgUwMQwe92esJwmvcnyTgPeTvbnmwBX5YZ6d76Y99mPboCXA479MG2zQvqI7EQ.d1v9PTHw4BxXZahwsB1HqsZ3xzBYeMQSUfOUEtS56Ithm3+GYJ1PepQ3HTeXgRTip4w7c6l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Sm68E1MfQibzy.3l1m76q6PtOv12SDYlUqEQKYPAkc6nf9PQrCE1cNbuPYNuKXt+jHenQ1v.8ob2XgagOoFOxHakZ7nLin.hiT7YmjWQLSVucrF.S73+HQQ3ez.xPWy3WVxyyAP04mcbleotWfudcC76W2.ey5F3OrtA910MvebcC7md3.MMOdWjVDjbsAgZ0sQ7SwVVMh6tDWsh9O.xxyQTB
-
@ustk So when I click show green. Why don't you want the combo box to reset to say "SELECT TO SHOW RED"?
-
@d-healey because I still wants it to be activated with the selected item
The buttons and the combobox are not related in the project, they just show a different panel when needed -
@ustk From a UX perspective, if I press a button and it visually affects something I selected from a combo box, then isn't it related? I think I'm not seeing enough context here to understand exactly why you need this behaviour.
-
@d-healey yes it makes more sense in the real context
-
@ustk why don‘t you decouple the popup from the combobox value callback and then add the logic as mouse callback broadcaster to it? It will then show the popup whenever you click on the combobox no matter what is selected (or was selected).
-
@Christoph-Hart I tried this using the doc example but I wasn't convinced I could do it, so now you say so :thumbs_up: