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

How to put border over several checkboxes? #190

Closed
chshersh opened this issue Oct 7, 2018 · 1 comment
Closed

How to put border over several checkboxes? #190

chshersh opened this issue Oct 7, 2018 · 1 comment

Comments

@chshersh
Copy link

chshersh commented Oct 7, 2018

I would like to draw a layout where I have several groups of checkboxes. To make visual representation of my TUI nicer, I would like to group checkboxes with the help of some border. So I want to draw something like below:

---Group 1---
| [ ] Foo 1 |
| [ ] Bar 1 |
-------------

---Group 2---
| [ ] Foo 2 |
| [ ] Bar 2 |
-------------

I see that @@= operator composes, but it can put only single FormFieldSet into the border:

, label "Address" @@=
B.borderWithLabel (str "Mailing") @@=
editTextField address AddressField (Just 3)

Is there any way to group multiple checkboxes inside border?

@jtdaugherty
Copy link
Owner

The forms API isn't intended to support this kind of presentation, unfortunately. With care, though, you could do it with joinable borders, if it is really important to you to get this working. I wouldn't recommend that approach, though, because it's going to be a mess. In case it would help, though, here's a modified version of the bundled FormDemo.hs that does this for a pair of adjacent fields.

FormDemo.hs.txt

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