Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Formatting checkboxes in SugarCube

edited August 2015 in Help! with 1.x
The SugarCube checkbox macro does what I want mechanically, but if different entries have different word counts, the text boxes end up not underneath each other (they're just displayed at the end of each word).

Is there a way to get them into a more table format?

Would the easiest way to accomplish this just use non-breaking spaces to make each entry the same word count?

E.g.
Apples 
Oranges

Comments

  • Unless you're using a monospaced font, that's not going to work, save by accident.

    The easiest way would probably be to put the checkboxes before the labels, since they're all the same size, thus your labels will align properly.

    For example:
    ''What fruit(s) do you like:'' (check all that apply)
    <<checkbox "$likesApples" false true>> Apples
    <<checkbox "$likesOranges" false true>> Oranges
    
    The same with <labels>:
    ''What fruit(s) do you like:'' (check all that apply)
    <label><<checkbox "$likesApples" false true>> Apples</label>
    <label><<checkbox "$likesOranges" false true>> Oranges</label>
    

    If you have to put the labels before the checkboxes, then the easiest thing you could do would probably to use tables.

    For example (using wiki tables):
    ''What fruit(s) do you like:'' (check all that apply)
    |Apples |<<checkbox "$likesApples" false true>>|
    |Oranges |<<checkbox "$likesOranges" false true>>|
    
    n.b. The space after the label is to left align them.
  • Thanks, gives me some ideas.
Sign In or Register to comment.