1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Vote Rating
    1
    Answers
    1
    new boy is on a distinguished road

      0  

    Default Answered: Formatting Checkbox Height

    Answered: Formatting Checkbox Height


    Hi,

    How do reduce the amount of whitespace above and below the checkbox text so the whole checkbox is not as high?

    When I use height: 10, the checkbox height is reduced, however the text and tickbox are then obscured. I've tried everything I can find in the documentation, which probably means I haven't found the right thing.

    checkbox.png

    Thanks in advance.

    New Boy

  2. For the benefit of others, I solved this by changing the values of BOTH

    $form-field-height
    and
    $form-spacing

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You should inspect the DOM and look at the elements to see which ones you can change with CSS to affect this.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Vote Rating
    1
    Answers
    1
    new boy is on a distinguished road

      1  

    Default Solved

    Solved


    For the benefit of others, I solved this by changing the values of BOTH

    $form-field-height
    and
    $form-spacing

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Vote Rating
    1
    Answers
    1
    new boy is on a distinguished road

      0  

    Default


    I have subsequently found that through the (incorrect) use of CSS it is possible to create a checkbox with unusual behaviour, its response depends upon where you click on it.

    By clicking on one half of the checkbox, the status indicator changes and the event handler fires as expected.

    By clicking on half of the checkbox, the status indicator changes but the event handler does not fire!

    This may be a bug? Should I report it as such?

  6. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Vote Rating
    1
    Answers
    1
    new boy is on a distinguished road

      0  

    Default


    This has been reported as a bug and accepted as TOUCH-2850

  7. #6
    Sencha User =NR='s Avatar
    Join Date
    Mar 2013
    Location
    Singapore
    Posts
    111
    Vote Rating
    0
    Answers
    2
    =NR= has a little shameless behaviour in the past

      1  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    You should inspect the DOM and look at the elements to see which ones you can change with CSS to affect this.
    this never help mitchell,
    we both know that sencha ui component are deeply nested within tag and there is a lot of css rule related with one ui component (and that css also will be related to other ui component)

Thread Participants: 2

Tags for this Thread