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 #32

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

Conversation

victorlevasseur
Copy link
Contributor

This PR adds a ListBox widget. It's based on Zax37 but has almost been entirely rewritten to improve the widget.

Features :

  • Vertical scrollbar (never, auto or always)
  • Two size "modes": requisition adapted to the max width of items' texts or items' texts shrinked to fit in a not large enough ListBox
  • Multiple selection modes: no selection, single selection, multiple selection
  • Rendering code in BREW class
  • An example is provided, demonstrating 3 types of listboxes

Remarks ?

TODO: When you agreed on this implementation, write the doc (and squash the commits ?)

@victorlevasseur
Copy link
Contributor Author

Bump.

@binary1248
Copy link
Collaborator

22 commits? Can't you squash them (at least yours) or something? 😕

@victorlevasseur
Copy link
Contributor Author

When you agreed on this implementation, write the doc (and squash the commits ?)

@binary1248
Copy link
Collaborator

It's easier to review changes when they are batched into fewer changesets.

@refi64
Copy link

refi64 commented Feb 29, 2016

@binary1248 Can't you just look at the "Files changed" tab?

@binary1248
Copy link
Collaborator

I like to checkout the code locally and review it using my own tools.

@victorlevasseur
Copy link
Contributor Author

Ok, will do it. :)

@victorlevasseur
Copy link
Contributor Author

The commits are squashed (I did not squash Zax37 commit so that he still appears).

@Zax37
Copy link
Contributor

Zax37 commented Mar 2, 2016

Thanks for mentioning ;)

@victorlevasseur
Copy link
Contributor Author

Bump.

I fixed a bug causing the scrollbar not to update when adding or removing items.

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

Hi,

Is there any desire to follow up on that PR? I have updated to recent master on my local fork. I'll be happy to help getting it merge, it is a really useful widget! One question though, is there any any reason this is not a list of Widgets and not only sf::String? That would allow for more customization (like prepending icons...).

Great job though, I tried it out in a toy project, and it works really well.

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

7 participants