MyGUI / mygui

Fast, flexible and simple GUI.
http://mygui.info/
Other
713 stars 205 forks source link

Combobox with image and text #236

Closed corentinjaffre closed 1 year ago

corentinjaffre commented 2 years ago

I'd like to create comboBox displaying text and a small icon to the left of the text. For instance: a list of textures, with a small preview to the left of the texture name. Is it possible with templates modifications? (I can't manage to do it this way) Or would I need to create a new type of combobox inside MyGUI code?

Altren commented 2 years ago

I guess, that this images list is not static, so unfortunately there is no trivial way to do this. You should use ItemBox, with each "item" represented by layout you need (with images and stuff). Also you never need to create new widget type inside MyGUI code (if you want to go this way), it is ok to register new type externally.

corentinjaffre commented 2 years ago

Thanks! I will try ItemBox.

corentinjaffre commented 2 years ago

As another option, is it possible to have a different tooltip per comboBox item? I could use this to display a preview image when the user hovers the mouse on a combox item.

Or is it possible to have a delegate from the item mouse hovering?

Altren commented 1 year ago

a different tooltip per comboBox item?

Only per ItemBox item, since it is fully customizable any way you want

Or is it possible to have a delegate from the item mouse hovering?

No