You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Lucio Crusca <lu...@sulweb.org> on 2014/12/16 11:19:47 UTC

CheckBoxX style (wicket-bootstrap)

Hello,

I'm using some CheckBoxX instances and I'd like to apply a style to them. I 
want the "true" state to be shown as U+2713 (✓), the "false" state to be shown 
as U+2717 (✗) and the "undefined" state to be shown as a question mark (?). 

Moreover I want to make the box (or symbols) size the same as the usual wicket 
CheckBox component, whatever it is (I've not changed it from the default in my 
custom style.css). The CheckBoxX default size seems to be way bigger than the 
CheckBox one.

What's the "standard" way to make those changes to CheckBoxX? Is it possible 
at all to use CSS to change the characters shown for each state? (e.g. I'd 
rather avoid using bitmaps for the states instead of unicode characters).

Thanks in advance,
Lucio.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: CheckBoxX style (wicket-bootstrap)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Tue, Dec 16, 2014 at 12:19 PM, Lucio Crusca <lu...@sulweb.org> wrote:
>
> Hello,
>
> I'm using some CheckBoxX instances and I'd like to apply a style to them. I
> want the "true" state to be shown as U+2713 (✓), the "false" state to be
> shown
> as U+2717 (✗) and the "undefined" state to be shown as a question mark (?).
>
> Moreover I want to make the box (or symbols) size the same as the usual
> wicket
> CheckBox component, whatever it is (I've not changed it from the default
> in my
> custom style.css). The CheckBoxX default size seems to be way bigger than
> the
> CheckBox one.
>
> What's the "standard" way to make those changes to CheckBoxX? Is it
> possible
> at all to use CSS to change the characters shown for each state? (e.g. I'd
> rather avoid using bitmaps for the states instead of unicode characters).
>

Yes.
All this is possible with CSS.
See at
https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.java#L46
how it is configured to use XS (extra small) size, and some Font Awesome
font icons for the states.

CheckBoxX's documentation can be found at
https://github.com/kartik-v/bootstrap-checkbox-x.


>
> Thanks in advance,
> Lucio.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>