Style Preset Browser & Dropdown with Look and Feel
-
@Straticah
Hey for the first one you can overwrite the ComboBox items with a custom LAF. Here is a scrappy example:To style individual items you would do something like:
obj.text === 'Show Preset Folder' && drawCustomCode();
You can also check for dividers which is handy.
HiseSnippet 1136.3ocsV80aaaCDmxIJX1cacEXe.D7KyAvvvtoqcXECq1I1cFKN0HNqa.ECEzRmsXCEo.EUbLFxa6Cv9pruY6s8X1QQYK6DmzTCLB3+v62cG+wiGuiCUReHIQpHNkOadLPb9b2QyE5vCCoLAo+QDmuzc.MQCJOqnNyioIIP.wwYmWaD3TdWR13e9wNTNU3CEhHj2JY9vwrHltP5vW8yLNuGM.NiEsh1O6U88khCkbYJxmcbaRho9mSmBmPMpUxk3rW2.lVpFooZHg3raGYv7QgxYBq9ukkvFyAyjVjQnirh6I4AFFajRNLjwCFtXemPPuLrHJriMJ70tCXArkxKhFeUFfWgEqFObJsN81YM505tn2FnjyJTZWKkdh6HeEKVWfX3yib6KvCmITLruJUr5RJEVx8PIpgP2HhdNzSgSVZQsm2rYcO7q8eYkJXnOQ6cb6dd+fWWwTl.Z3q.bi7ZtbLkac3wR44sEA8.fWyXDpdCELkYRP5kJ70LonV0.Ec1PYbZ7.Pj1WCQUq6MYA5z5dxweX+J+QEObbAU4QwUDE0fhKG5SiX1jZFIrjehMMjiezPv9YHVyLioMR.sMaol8mDjKAHsJzXBlncJ3qqsv+4nWk8ck6xMyBYZHW0oMLam1HIDPvYvkVeow+T2iV2qJGlnqh5d0CLdzAyompjohfMGUJmS61b9R9LlmB1kXgAdRwIRM7FQsLapfanaBMYxFwLoCJImCpMBatRptOCqIRiFCp53QmgUKTDySWO4euGVxuuM6bEEkh9Bl9MwP976+1KIO8F+2uz+HplZt8jKC0KFTZlgNNGAWfkhr2kJ6dDjbtVFmoaTrTX7fyiz4W9sI683RplIldFCoMCYvicWUTKxkqVoa9pSxIfc0dr6PEfIYcTxYIfhLd5hZbk2C08eMFf4aQER+6q+qqWW5SyUNajsMK8mkbMWFpZBcinW.cR0Zon526oUoP8EHcuLlJRvSvj1InqRiLZLgxSJTIK.q1r4lLoja4S7f1p9ZPEhwbOb+hXsZtzn1AAadINEDX88MicDvA8cf0idgTgQHSSiUwxYVebWG.cjJbus1V9jzHafvP9CxDYm+qr.c3o34qDAdW1k+lMN3Fi5ehxQw+d1ZbLVTnMVAZYrIeEpuoeVZkkYmJmMjFDfIdOT6FATkeXGppioRiYm9NKv.oJOddSjhbnahrHReKzJWQlYBZDGWmQkHjPvTp1L6abLM5uUSLr8oLHkS0q2S07Phb.LScsFYllU3Iod9pOz3SnQay6sQ6CkhOwcHS6GtYNVZCbDqB8+AGyedxW31cxDrsVAA20s2ussuE4ir7mJSMk7FP0JFVwyEu+LBqH4C3pKD.OwbdWxTzyNuoYtIBLBDAYStFG4fsLycxAas.jDQ8Ux26a6vXd.zmkIA4jH6sekwGghy8ZQx55rZbNBeO1688W2U2xvmtsFdv1Z3y1VC+1s0vmusF9hs0vu6ian44xsS0xH60FBYvvtY8ubb5JnXFXV1J4+.rOPDVD
for your second example I would not use a classic ComboBox but built a custom element using a Viewport Table. There you can dynamically load in the data and have multiple columns. This should get you started.
-
@oskarsh got it this is what i was looking for! Thank you very much!
-
@oskarsh how would i exclude the dividers in the hover animation?
-
@Straticah said in Style Preset Browser & Dropdown with Look and Feel:
@oskarsh how would i exclude the dividers in the hover animation?
Console.print(trace(obj));
-
@d-healey @oskarsh a solution to add the rounded edges and keeping the drop shadow? It gives me some white edges. But the spacer works now :)
HiseSnippet 1183.3ocsV8taaaCDmxIpX1YasEXO.B9SN.FF1IoqEaXXwN1pyXwoFwYcCnnnfQ5rMWnIEnnRhwP9xvd.1G2qwdy1aP1QQaKoDmsLiUg.Dy62c79wi2e3PkL.hikJhS4ylGADmO0czbgd5QSoLAoeWhym6NfFqAkmUTm4Qz3XHj33r0qMBbJuMI86u91NTNUD.YhHj2JYAvwrYLclzgG98LN2mFBmwlkS6CNrefTbjjKSP9rkaSRDM3B5D3DpQsRtDmmz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5Kdipmm+cP+u8NfGKEet6PlNX554Xo0vQrazGCNt30SelauwiwQEYDbaW+e5iySkH3nISquATshgc9bw5nQXmo..8tP.bSedmRlle10MMqMQfQfHLcws32BvVl0NK.asDjLiFnjeHvNcw79rOIUBxIQ5SSKiuQFW60hjNwIebdF9bwODDTbqtmg6soFt+lZ3AapguXSM7K2TCe4lZ3q92Mz7Z91IZ4LaYCgLXXuz4XNN8DTLCLMak72cvToBC
-
@Straticah You can't with combo boxes unfortunately. They don't have a transparent background so you'll always get white.
-
@d-healey oh okay :)
-
@d-healey i have found the item size function from an old post from you. How would i apply this to the dividers only to make them smaller? I tried to
if(obj.isSeparator)
inside thegetIdealPopupMenuItemSize
function but it did not change anything.here is what i have so far thanks to you and @oskarsh :)
HiseSnippet 1308.3ocsW0uaaaCDmxIpXxcacEXO.B4ubwLbkra9nqXXwNwpyXIsFwYcCvHnfQ5rMWjIEnnxGan+yvd.1etWi8js8FzcTR1VJwIKynk.VV79h+tiGuipuT3CwwBIwv53qh.hwmZN3JtZxdSnLNo29DiO27PZrBj1Yj5bUDMNFBHFFq8RMACq0Ioi+4a6PCobeXAIB4MBlOb.aJSsfZ+c+dVXnGM.NlMsfzOa2d9B9dhPQBhm0LcHQT+ynigWQ0hUwjX7ftALkPNPQUPLwX8NhfqFLQbAOS92vhYmFB5ItjAngxH6IBCzHVSkr2DVXP+Y9cLAsR+EQg0xhBeo4gr.1b5KhFeQJC6EZTLdXToL7VqD7bKBOmBvaIPxn.jVOCRO1bfujEoVvQimGZ1iiaNinXXuHTxjkT4uW2bOAJAW0XJ8LvShSlqQssbbpaiOdxKpVEC8wJ6CZ6Y+M1c4iYbnguDPG4kghSogYF7.g3r17.O.BqoUBEugDFyzIHdIbeESvqswXP0K.ng8EQIQGB7jdJX5.1u.aT2dzLoDm9yOo5uV0ppkDTIRt8vltt0sa4bxKrqhje2sa+.I8hR1tncGW2N2z133bpzlhdDRpAEcGzlViaDCprzrZNWtsy9dc2wqItbHGsoaGxFygf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TLCLMak7u.i51BL
-
@Straticah It applies to all items
-
@d-healey got it!, is it possible to delete the dividers?
-
@Straticah I don't think you can, without editing the HISE source.