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

GroupWidget scrolling issue? #599

Closed
matkuki opened this issue Oct 16, 2019 · 4 comments
Closed

GroupWidget scrolling issue? #599

matkuki opened this issue Oct 16, 2019 · 4 comments

Comments

@matkuki
Copy link
Contributor

matkuki commented Oct 16, 2019

Hi,

I have a GroupWidget. If there is no set max-height for the widget like so:

with flx.HBox(padding=0, spacing=0, flex=1):
    with flx.GroupWidget(title="TEST", style="overflow: scroll;") as self.gc:
        pass

... which I add flx.Labels to it at runtime. The problem is, the bottom part of the widget get's cut and the contents get covered on the right side by the scrollbar, like so:
image
Setting the max-height to something lower than what can optically be judged on the screen fixes the bottom cutting out issue, but I do not wish to try to eyeball the height every time.

What is the correct way to use a GroupWidget with scrolling, so that these issues are are not a problem?

Thanks

@jrversteegh
Copy link
Contributor

Imho a scrollable GroupWidget doesn't make any sense. Why would you want that?

@matkuki
Copy link
Contributor Author

matkuki commented Oct 16, 2019

I use it to show what reports were generated. And it looks quite nice.
Could I use something else and make it look like a GroupWidget, with the frame and title text?

I also tried a VFix and VBox instead, but they have a different problem, as described in #583.

@jrversteegh
Copy link
Contributor

jrversteegh commented Oct 16, 2019

Lists of stuff should be in some sort of listbox imho or a grid maybe. I am somewhat surprised there is no listbox in the default widget set (See e.g. #538), but there are plenty of ways I guess. The most obvious one being just a scrollable widget within the GroupWidget.. or creating an <ul> widget: something like this for example http://bit.ly/2MkKFtd? Disclaimer: IANAWD

@matkuki
Copy link
Contributor Author

matkuki commented Oct 28, 2019

One way around this is to put a flx.Widget inside the flx.GroupWidget, and then adding all the labels to the flx.Widget instead of the flx.GroupWidget.

@matkuki matkuki closed this as completed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants