Customize SComboBox rows ?

Hi,

Is there any way to remove the yellow highlight color in combo boxes in C++ ?
The FComboBoxStyle structure doesn’t define anything about this.

EDIT : it’s been a week, has anyone an idea about this ?

Thanks,

Anyone ? :confused:

Does anyone uses combo boxes with Unreal ?

Well, it looks like there is no easy way to do it. So here comes the hard way:

Note that ComboBox is just a simple button that spawns a SListView widget upon click and to control style of this list rows you must override list view style.

I would start with creating my own ComboBox widget that derives from SComboButton. Basically just copy/paste code from SComboBox.h file and make it your own - SMyComboBox for example. Then you can actually set the row class and style as you wish in GenerateMenuItemRow function

The idea is very simplified but I think it should be ok to get you on right track.

It also depends on how flexible and generic would you like this SMyComboBox widget to be. Unreal’s implementation is templated so you can put any objects into combo list but if you only need one type of data then maybe you should consider creating your own widget from ground up without copy/pasta mentioned before.