Get Num items in Combobox?
-
How do I get the length of combobox items?
-
@Chazrox Convert it to an array -
String.split()
, then use.length()
-
@d-healey Let me try. Thanks!
-
@Chazrox I think the
“max“
property is also updated to reflect the number of items so you should be able to just query that (not 100% sure though). -
@Christoph-Hart Thanks! I'll check that. That sounds way easier.
-
@Chazrox Yes
Console.print(ComboBox1.get("max"));
-
@d-healey How do I get the itemText of the currently selected index of a viewport panel? Im gonna use a viewport instead of combobox.
-
@Chazrox Use
split
(again) to convert the list of items to an array, then use the viewport's value as the array index.HiseSnippet 883.3ocsV01aaaCDlzIpnV6ErNzuN.gf9Amgh.ojXmBTTzt3jrYrkTi4rfArMTPKcJhHTjBhTMyXn+L6+i8OX6HkrsxhQRpAl9fEOd2ycO53cG83RULn0pRB0+7YE.g94dSlIMYCyXbIYzQD5W5cJSafxf5sNbVASqgDBktw2a2f1cSh64ue8gLASFCK2hPtPwigehmyMK2c7a9QtPbBKANmm2x58eynXkbnRnpP9rgWHofEeE6R3Ll0rNdjefoyHzu0isaDraR+o6cvA8Sgv98Cg9QGDxFjFteR5KFzeuoSiRfAD5iNNgaTkSLLCnQmdnJY1jL00x5.bAWymJ.qPDYBF45sICy3hjwySNZBgt43kopMpSUO06TdBew9KSYekSQvRDsSZzN2Ekh9DnDsEk1rlROwaRbIuvrTikOel2HIdBlxvyl1To1VRmOR8FpPKjlcxYWAmThBKPzaPX3yCve19k9934i1D7dVYvEb35BUoIJ3UAyAeIXFpxKTRTn2VKrXKKRetTvkPPZkL1vUx.kbgAV7kJQu34feNFBQErs+e42UnhYh.tAx0XnVXhMX81xs8VauitPvQweWZiUW+tnG0JArSQIGohypey4x+.0+AjN2Kk2Qa0330PlPLEqD6caJidq0GzYJC7VYOGs8+fev+UUZ5J003KATtR01ljx6BXOYU9TnrcRyZHVTbyJsG8vpzhqSMsLTIGI4l2V.MxmnDI1JH65aWWRZxs1JzFFhlZb0mecS8IjLOSR3I1BzEIVh6in8HDxuL5HlgM2cnmwnU.kFt8ihdD7dbDSc4eWui.8UFUgy1liUB8wO3f+mDpG8avXNyt3Zbgq1gPel2HbQPju60t0u1q9090u5StlmXxr.OmRHY.+xLiUJCkpz3TPMJR6PtcaKNvPkTIXlaNEwNesQAdfeiVWa6oTyMyZO+8SXzR3cNZ4gRwm3MlahyVMG6rBNhGh+evwlAxeg2wooPrYIA2z6jeccm9dOg+mUUFt7xSYlRtsr4rp7I3EWw.FcoDDZ6QeGa6PsbnU1lAl.xDmv+fOMJirxzFkQyURxYwkp2EW2DYG4+X2NHmjtqD6h2MixAqnqIGuA5cww2zU2B3tqKv8VWf6ut.6ut.Grt.OXcA9h6Gn8OH7cUFUdcaCgb53icS4nzikLrBzUsR9WqTNsvB
-
@d-healey That worked. Was confusing at first but I get it now.
-
C Chazrox has marked this topic as solved