ComboBox display text
-
I'm seeing an issue with combo boxes not displaying the proper text at initialization. Specifically, when calling setZoomLevel().
Here's what I'm seeing:
//----------------------------------- GUI ZOOM ------------------------------- const var GUIzoom = Content.getComponent("Ignoreme"); const var zoom_level = [.5, .75, 1, 1.25, 1.5, 1.75, 2]; inline function onGUIzoomControl(component, value) { Settings.setZoomLevel(zoom_level[Math.round(GUIzoom.getValue()) - 1]); }; Content.getComponent("Ignoreme").setControlCallback(onGUIzoomControl);
This combo box works correctly when I test it with other callbacks, but as soon as I use it to set the Zoom control callback, it initializes with text instead of items.
-
@dustbro
HiseSnippet 952.3ocsV0vZaaDF9jSTWr1GzB6GvggBxPhpjWSyfv17hcRwrlDybaXzzP3hzYqaQ5Nizoz3N5+z8in+C5de0GUJsljTCSXjz62O2qtm2yiST97zTUBwn8KWLmSL9NyIKj5vAgLgjLZHw3GLOjkp4IzBU6sXNKMkGPLLV64nBi1qSxu9vusGKhI840pHjSTBe9KDwBcs1w8+CQTzAr.9KEwM79o8G4qjCTQpL.OqY5Rly7ujMieDCcqkIw3A6GHzpjIZllmB9rmJXwjP0akE9ehHUbQDGE7HSfDUnlLHTDELtZslRHFqOtdkuVwJ+GMOTDH9j95NvCyMPqinYOvn0sAIuuBHYz.RqW.oGYNwOQLWWaAwy2ZNRBePlxfVcSnT3Ko0+1xbfB7PpchYWxOHAD9TD1Oy0cSJbq6tO4Iac2Wzm+pQzWe7wGRuCGsrfOdoZ5UrDLl2oTwzegVAjYb8.U7bkDDr6LZlTkvi4c5tqEk1HPLpyi3WwifXO0Y6MoN6.27feN8vWbxug55c1tMKYUJuW0r5cmTNXQn4woc1jdZmsceL7ryNam+vysPzqWoboYuR68P6m472Jgztyajc5BY1RHiDRNcZlzWKTRpRV1LPTknhr8qfzl.tix3cs9Gq1S3ZsPNKEAzqAmeA1Brq6FmdHSG5jnxjA1k4CWdmfIvtaW5VTuyfp+d..20pGKQIVFvhht.nX1eNH6taC7ejRyOVZmiSq2aQ+bSSmtTakoJhmrTyH0O41BzVlEeAOoYWBcD3F2jv8f6GgyunszvQkbjTnOdNuT9.UT.Rjv2+R5IoruhD0RDBtpyooOrjlB86KT6otlHfzXYV0yI4qf54bazm7pQCYZVUtfzBkZNOQKvUjwP9UvTyhQ.sMGxSuTqlm6a42ShwF2uJeccU+09KpEF1OlA1LM9FP3sh.cHJbMHDxEyB0njMHkSMHFcLgs9Vv1dKjSXgDBKjMXgTAKjG.S0+hoWvbSUPVDSeygo3oFkFfO32XBFNkRlJzKZdpxWwDV2acB68EhOxbrP6GtbL1ZIXD9N9+AFKOW56M2e5TtutFfqadvespGBcGk+OUY3fHXbSh.2fbTV7D33XeNTcojGkh6LZgzgBYWTF6.S3xfbgOBWkF8PYiRidUFIwL+D049EjH7juMx0.XRlePea3eb.xTuJhiooqiKIFND9beeb4uEvPWdL8VgX9oUHlmtBwr8JDyyVgX1YEh4mu0Xv++yumoUwEzAPw38yGfYXrujA6rx2ER9O.AzmwRB
-
@d-healey I think it has something to do with the defaultValue being set to 3 (100%). Gonna investigate a little more
-
Finally figured it out... but I'm not sure what to do about it.
The combo box doesn't show item text when saveinpreset is disabled.
If I enable this, changing presets would also reset the GUI scale.
How are you guys handling this? -
@dustbro I use the built in settings panel and style it with LAF :)
But what you probably need to do is write the settings to an external file and read them back in on init.
-
@d-healey said in ComboBox display text:
style it with LAF
Think I might take this route. Thanks for the advice!
-
@Christoph-Hart Just noticed that setZoomLevel() doen't work in StudioOne. I'll try to debug