Hi Jason,

Thanks for the reply.

>>> Do you want the actual check controls to align? I suggest just making
sure your text is not too long in ipywidgets 6.

I would like the checkbox  to right align.  Unfortunately, I don't have
control over the text and I need to display in full.  As an FYI, they are
names of people, so they really are not that long.  I certainly could cut
off the text to be a certain size but it seems the alignment gets thrown
off when the lengths really aren't that long.  For example, the text above
"Item 2 - long" vs "Item 3 - longer" is the beginning point of where the
alignment starts to change.

I could try to use ipywidgets 7 - is it available?  I just tried an upgrade
and still showing 6.0.0.

On Wed, Jul 5, 2017 at 10:49 AM, Jason Grout <[email protected]> wrote:

> (1) We've changed checkboxes in ipywidgets 7 to have the checkbox first,
> rather than the label, to be consistent with standard checkbox practices
> (2) In ipywidgets 6, the label is right aligned, but a slightly longer
> label will push the checkbox over just a bit, rather than cut off the
> label. If the label is really long, it will be cut off with an ellipsis.
> (3) ipywidgets 7 allows you to control exactly how wide the label is,
> which defaults to a single fixed width.
>
> Do you want the actual check controls to align? I suggest just making sure
> your text is not too long in ipywidgets 6.
>
> Jason
>
>
> On Sun, Jul 2, 2017 at 12:47 PM zinc1oxide <[email protected]> wrote:
>
>> Environment:
>>
>>    - Python: 3.6.1
>>    - ipywidgets: 6.0.0
>>
>>
>> Hi, I'm working within a Box widget that contains Checkbox widgets.  I
>> can't seem to find the proper layout settings to get the widgets to
>> horizontally align.  This is what I'm working with:  (*Note*: I do have
>> to keep my display: 'block' setting in order to properly display my widgets
>> vertically).
>>
>>
>> <https://lh3.googleusercontent.com/-PERzGogjGoA/WVkhhgfI-CI/AAAAAAAAANE/xCrbIClp9DQdx1d_Z6wCjcdr0AYvru1nwCLcBGAs/s1600/img1.png>
>>
>> Code snippet:
>>
>> items = ['Item 1', 'Item 2 - long', 'Item 3 - longer', 'Item 4 - the
>> longest']
>> checkbox_items = [Checkbox(description=name) for name in items]
>> container_layout = Layout(overflow_y='auto', display='block', height=
>> '120px',border='1px solid black', width='200px')
>> VBox(children=checkbox_items, layout=container_layout)
>>
>> There seems to be some attempt of formatting by default.  The first 2
>> widgets within the display appear to be right aligned.  However, things
>> seem to fall off as we increase the text length.  I don't know how to
>> control this.
>>
>> thanks.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/jupyter/331c5222-68c1-4058-a97e-be60e79f5839%40googlegroups.com
>> <https://groups.google.com/d/msgid/jupyter/331c5222-68c1-4058-a97e-be60e79f5839%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Project Jupyter" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jupyter/c3ThmuDKiMA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CAPDWZHx0Hzi%3DmRehHR-rCTZkPaAnhs69EDh7%
> 3D6PqWgJGk43Fhw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jupyter/CAPDWZHx0Hzi%3DmRehHR-rCTZkPaAnhs69EDh7%3D6PqWgJGk43Fhw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANaM6mRAtRbLTMm5NnG2VVdd7V0tJ%3Dysi8P8%2BoidjABcAZYyTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to