develcooking

Results 2 comments of develcooking

@BigBeast420 Yes it's possible but so far only as an custom widget. See in https://github.com/slint-ui/slint/discussions/2657 This is written in Slint 1.0.2 so you have to change "choices" to "model" Also...

Or you could use a custom widget. The only problem is that the theming is sort of crap [link to slintpad](https://slintpad.com/?snippet=import+%7B+StyleMetrics%2C+ScrollView%2C+HorizontalBox+%7D+from+%22std-widgets.slint%22%3B%0A%0A%2F*+made+by+ogoffart+in+https%3A%2F%2Fgithub.com%2Fslint-ui%2Fslint%2Fdiscussions%2F2657+*%2F%0Aexport+component+ComboBoxScroll+%7B%0A++++in-out+property%3Cstring%3E+value%3B%0A++++in+property%3C%5Bstring%5D%3E+model%3B%0A%0A%0A%0A%0A%0A%0A++++Rectangle+%7B%0A++++++++border-radius%3A+15px%3B%0A++++++++border-width%3A+2px%3B%0A++++++++border-color%3A+gray%3B%0A++++%7D%0A++++height%3A+32px%3B%0A++++preferred-width%3A+400px%3B%0A++++HorizontalBox+%7B+%0A++++++++label+%3A%3D+Text+%7B%0A++++++++++++vertical-alignment%3A+center%3B%0A++++++++++++horizontal-alignment%3A+left%3B%0A++++++++++++text+%3C%3D%3E+root.value%3B%0A++++++++++++color%3A+white%3B%0A++++++++++++horizontal-stretch%3A+1%3B%0A++++++++%7D%0A++++++++Text+%7B%0A++++++++++++text%3A+%22%E2%96%BC%22%3B%0A++++++++%7D%0A++++%7D%0A%0A++++TouchArea+%7B%0A++++++++width%3A+100%25%3B%0A++++++++height%3A+100%25%3B%0A++++++++clicked+%3D%3E+%7B+popup.show%28%29%3B+%7D%0A++++%7D%0A%0A++++popup+%3A%3D+PopupWindow+%7B%0A++++++++x%3A0%3B%0A++++++++y%3A+root.height%3B%0A++++++++width%3A+root.width%3B%0A++++++++height%3A+min%28inner.preferred-height%2C+120px%29%3B%0A++++++++Rectangle+%7B%0A++++++++++++background%3A+StyleMetrics.window-background%3B%0A++++++++++++border-radius%3A+3px%3B%0A++++++++++++border-width%3A+2px%3B%0A++++++++++++border-color%3A+gray%3B%0A++++++++%7D%0A++++++++ScrollView+%7B%0A++++++++++++inner+%3A%3D+VerticalLayout+%7B%0A++++++++++++++++spacing%3A+6px%3B%0A++++++++++++++++padding%3A+3px%3B%0A++++++++++++++++for+value%5Bidx%5D+in+root.model%3A+Rectangle+%7B%0A++++++++++++++++++++border-radius%3A+3px%3B%0A++++++++++++++++++++background%3A+item-area.has-hover+%3F+%23eeee+%3A+%230000%3B%0A++++++++++++++++++++HorizontalLayout+%7B%0A++++++++++++++++++++++++Text+%7B%0A++++++++++++++++++++++++++++text%3A+value%3B%0A++++++++++++++++++++++++%7D%0A++++++++++++++++++++%7D%0A++++++++++++++++++++item-area+%3A%3D+TouchArea+%7B%0A++++++++++++++++++++++++clicked+%3D%3E+%7B%0A++++++++++++++++++++++++++++root.value+%3D+value%3B%0A++++++++++++++++++++++++%7D%0A++++++++++++++++++++%7D%0A++++++++++++++++%7D%0A++++++++++++%7D%0A++++++++%7D%0A++++%7D%0A%7D%0A%0Aexport+component+MainWindow+inherits+Window+%7B%0A++++in+property+%3C%5Bstring%5D%3E+the_model%3B%0A++++height%3A+300px%3B%0A++++width%3A+200px%3B%0A++++HorizontalBox+%7B%0A++++++++ComboBoxScroll+%7B%0A++++++++model%3A++%5B%22lorem%22%2C+%22ipsum%22%2C+%22dolor%22%2C+%22sit%22%2C+%22amet%22%2C+%22hello%22%2C+%22world%22%2C+%22lorem%22%2C+%22ipsum%22%2C+%22dolor%22%2C+%22sit%22%2C+%22amet%22%2C+%22hello%22%2C+%22world%22%5D%3B%0A+++++++%0A++++++++%7D%0A%0A++++%7D%0A%7D&style=native) by [ogoffart](https://github.com/ogoffart) in https://github.com/slint-ui/slint/discussions/2657