How to change ComboBox row height?
-
But apparently you want a thin CB with bigger rows.
I want the opposite. I want to increase the height.
You could also go full child panels to create your drop down? Because of the current "ghost" issue?
I don't even need child panels for this. I just don't want to do it :)
If we can override those functions then it should be possible to simply add a property.
I was thinking of adding scripting wrappers for the functions. How would they work as properties?
-
I was thinking of adding scripting wrappers for the functions. How would they work as properties?
Once you create a property for the height, you might be able to pass it to the function when the property changes.
I was trying to fake a smaller CB with bigger rows, and realised that once you set a custom LAF, the row height get back to a default value no matter the height of the CB...
There might be a way to access this in the local LAF function -
There might be a way to access this in the local LAF function
I couldn't find a way. But with programatic showPopup/hidePopup we can do whatever we want.
-
@ustk said in How to change ComboBox row height?:
Once you create a property for the height, you might be able to pass it to the function when the property changes.
Let me know if you solve it because having a row height property would be the best solution.
-
@ustk I think I'm getting somewhere.
@Christoph-Hart Can you explain this? https://github.com/christophhart/HISE/blob/develop/hi_core/hi_core/MacroControlledComponents.h#L375
Setting it to 1 will allow the overridden
showPopup()
function to work and in there we have access to the row height property on line 408:withStandardItemHeight()
-
@d-healey Nice one, there's the showPopup override here I was looking for! I'm sure my eyes slipped over it hundreds of times...
-
@ustk I've added the property, the last thing to do is get the property into the showPopup function. I'd also like to know why Christoph is using the
#if
... -
@d-healey Nice!
If you struggle with the property I'll be back tomorrow to help... -
@ustk Yeah I'm giving up on it for today. I'll wait for you :) Just need to figure out how to pass the property from the ScriptComboBox to HiComboBox
-
@d-healey that is the hard part I'm not sure how to do…
-
@d-healey please share the branch with me so I can have a look tomorrow git -> ustk
-
-
Any hints @Christoph-Hart ?
-
Yeah, this is one of a classic case of "Too late to the party and too lazy to catch up"...
But adding a
showPopup()
method is not as easy as it looks because there is a strict decoupling of the scripting objects that are representing a UI element and the actual element (because the actual UI element has a much shorter lifespan and can exist multiple times).A much more simple approach would be using this method:
and add a scripting layer to access it through a LAF object.
-
Wrong link, I meant the
getIdealPopupMenuItemSize
a little bit above... -
Too late to the party and too lazy to catch up"...
No need to add the showPopup any more. We can change the property directly. I've added the property here https://github.com/davidhealey/HISE/tree/comboBoxHeight
But I don't understand how to pass it from ScriptComboBox to HiComboBox.
And I'm curious to know why you did this https://github.com/christophhart/HISE/blob/develop/hi_core/hi_core/MacroControlledComponents.h#L375
and add a scripting layer to access it through a LAF object.
I think the property approach is more straightforward...
-
I would like to keep the amount of properties as low as possible, also there might be other use cases where this could come in handy.
The addition was super simple.
https://github.com/christophhart/HISE/commit/24c8360b2ac969919778e4e755e6a530fc47dd15
HiseSnippet 970.3ocsV0uaaaCDmxIZXV6CzBrG.h7WN.YtxoIoCHXXowIdyXIoFycECXXnil5rEWjHEHoZh2PA1yyd51av1QIYI4U2hBiUAXCce763Od7tiZhVwAiQoIdce9xLf38o9SWJswCiYBIY7EDuO2+ZlwBZZopyWlwLFHh34sy25T30cWRwye+MmyRXRNznhPdgRvgqDoBai1Im88hjjQrH34hzVdezYi4J4PUhJG4yN9gjLF+V1B3FlysN9DuO5xHgUomZYVvP718bUzxowp6jk9+BgQLKAbBCHSw.UpdjJIxwXmVxvXQRzjU6aCAixjlrvNkYguv+ZQjnVeS13AEFnMHZmO75rN81YM5MnM8BaQuMPIuVTZ2RJ8P+obsHy1XwwmOwerDOblyvzdapT5Koye0wenB8PZ6mxtEFoQgZD8NIL7.J929mFDfodik9JllZneMcEHtFv8xUJNK4Jk51mJiFAPRu0Avm0BwBvNTklojnPu8vWmoNWc+f8JfLquAruQzLNal9ZXgvUoMJWxsBkr2dXrFGArjIpr7rqAY9XKjNU76vdGPmuxK0rea+f+Hn6idD86.MPYtez4vc3aKxSQZXNflJVDaoy.pZN0nRAZtAJewh0f862OnKtALpDnelVfL2pcIHWrQx0sH51XgodYov8Y.2ZnfvFicGLItbZ1RpBemZDxEI.UlmNyYyTfWC1bsDyXI4PPWZSLuCaGnXhAk.THxFSsJ5gggXTinwPA2QMGG5vTEle9P2g2wg+xozUACCgoHFMPNAgTA3jvSCd89mVuATxaTV3YxdEYufWGP+ullOei1bmzZURBn2nYWSs9cArWYZ4fxLQsiXk95sO9u81m1c27xBuVNpjikB6yx.4aqmmTUs5Z0pXE5psnQ6AUMZqJcIhHWeVckLof1sm6Q9wwWvrrUACiKtVYf1JbaCuKfWgCAK6h65eAXt0pxJ7spMAmq8dtz2Wur+4hyVVK7qyNKkg1787QIA1jXb3FDbXviCNJ3Xbl6aLOAmjohxSX10Gu4loWY.OzValhatgzHrKau2+eal26KEen+DgkGuYN1YCbDOV9PvwpaJ9L+KmOGGDzPvc8G8SeXtVf7CpbKNY4ZlUKbG22jmNEurjC3pKkPhqowqiq7tTNzI6x.SAYTgv+fOUFG3j8pLNXkQRJiqUujW1T3tK5iKzfbRVbMbW76APYZcefueX+PRJds3K4b21+KwNtMi4vs.yi2BLGsEXNdKvbxVf4IaAlu5chw8EIOM2pRKaGPEStrXdjm2kRFVYUTER9W.kkguiC
-
And I'm curious to know why you did this
No idea, but my educated guess is that I needed to customize the behavior of the combobox at some ancient point in history (perhaps to scale with the zoom factor) and then it got implemented in JUCE so I removed it again.
From looking at it there's not much use to it.
-
-
I've added the documentation for this and the drawPresetBrowserIcons LAF function.