Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListBox widget added. #31

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

ListBox widget added. #31

wants to merge 14 commits into from

Conversation

Zax37
Copy link
Contributor

@Zax37 Zax37 commented Nov 25, 2015

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).

@eXpl0it3r
Copy link
Collaborator

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.

@victorlevasseur
Copy link
Contributor

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).

@binary1248
Copy link
Collaborator

Sure, go for it.

@victorlevasseur
Copy link
Contributor

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 ?

@binary1248
Copy link
Collaborator

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... 😉

@victorlevasseur
Copy link
Contributor

Ok, will do it :)

@victorlevasseur
Copy link
Contributor

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
Copy link
Contributor

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

@TankOs TankOs added the feature label Jul 15, 2016
@vfjpl
Copy link

vfjpl commented Dec 13, 2019

I'm also waiting for this one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants