SFGUI icon indicating copy to clipboard operation
SFGUI copied to clipboard

ListBox widget added.

Open Zax37 opened this issue 10 years ago • 9 comments

I've created simple ListBox widget basing on ComboBox and CustomWidgetExample. Selection works same as in windows explorer. Check out the example.

I'm not familiar with the styles engine, so I'd be grateful if someone made selection color customizable(currently hardcoded sf::Color::Blue).

Zax37 avatar Nov 25 '15 22:11 Zax37

Looks like the whole BREW stuff is missing.

I'm not familiar with the styles engine, so I'd be grateful if someone made selection color customizable(currently hardcoded sf::Color::Blue).

It's quite simple. Just have a look at the existing BREW elements.

eXpl0it3r avatar Nov 27 '15 07:11 eXpl0it3r

Looks like the whole BREW stuff is missing.

The whole BREW rendering seems to be integrated inside the widget itself (in ListBox::invalidateImpl()). I can change @Zax37 code to put the rendering code in the BREW renderer and make another PR if you still wants this widget (I'm interested by this particular one for a project of mine).

victorlevasseur avatar Feb 21 '16 23:02 victorlevasseur

Sure, go for it.

binary1248 avatar Feb 21 '16 23:02 binary1248

Its ListBox implementation doesn't support scrollbars (it keeps growing when items are added). Should I add support for scrollbars (vertical at least) or keep it simple while the user can still have scrollbars by combining it with a ScrolledWindow ?

victorlevasseur avatar Feb 21 '16 23:02 victorlevasseur

It would be nice if the user didn't have to do so much work themselves for something they almost always expect. Add the scrollbars... :wink:

binary1248 avatar Feb 22 '16 00:02 binary1248

Ok, will do it :)

victorlevasseur avatar Feb 22 '16 00:02 victorlevasseur

I know how to add and manage the vertical scrollbar (scroll item by item) but I don't know how I can manage a horizontal scrollbar. Putting "..." at the end of the item's text if it is too large could be a better (and easier ^^) idea.

victorlevasseur avatar Feb 22 '16 00:02 victorlevasseur

Made the implementation in my feature/listbox branch : https://github.com/victorlevasseur/SFGUI/tree/feature/listbox

What do you think of it ? (some features are still missing)

capture du 2016-02-22 12-39-44

victorlevasseur avatar Feb 22 '16 10:02 victorlevasseur

I'm also waiting for this one :)

vfjpl avatar Dec 13 '19 22:12 vfjpl