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

Confused about separator dimensions #3

Open
Jose123456 opened this issue May 20, 2022 · 1 comment
Open

Confused about separator dimensions #3

Jose123456 opened this issue May 20, 2022 · 1 comment

Comments

@Jose123456
Copy link
Contributor

At line 116 in the readme you say "Note that the Separator Widget is by default 1x1 pixels in size. This allows us to expand it in the vertical direction as well as horizontal." However, you later create another separator at line 166 like this Fl_Box sep2(0, 0, 10, 1). Do the separators have to be 1x1 boxes in order to expand properly?

@osen
Copy link
Owner

osen commented May 22, 2022

Hello,

Ah, that could actually be left over from my ANSI C implementation (here). That library I was rendering the components myself via simple SDL drawing functions and they had default sizes (which FLTK does not).

In FLTK, in many ways it is annoying that you must specify the size during construction. So for the example I gave it made a bit of sense to make the separator more than a pixel in the W to show intentions. Using (0, 0, 1, 1) should absolutely work though.

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