Results 1 to 6 of 6

Thread: Align is not applied for radio/checkbox widgetcolumns

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294

    Default Align is not applied for radio/checkbox widgetcolumns

    Hi all,
    here is a fiddle.
    There are 3 widgetcolumns all of them are aligned 'center', but checkbox and radio are not aligned properly(always aligned 'left'), but the boxLabel is aligned properly
    Thanks.

    UPD: to fix this problem I added the following CSS:

    Code:
    .x-grid-cell .x-form-cb {
        left: inherit !important;
    }
    initially left was 0.
    Of course baseCSSPrefix should be used instead of 'x-'

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    This bug (EXTJS-20017) was marked as Won't Fix. As I understand the explanation, the 'align' option is for aligning the text in the column. Because the widget is always sized to the full width of the cell, the 'align' option is not relevant here.

  4. #4
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294

    Default

    Thanks Gary for explanation, but developers forgot that widgetcolumn is designed to manage the non-text content, and it should have own behavior for such things. In any case I get used to have a lots of overrides to have appropriate behavior,but it is always the pain to migrate projects written on extjs to higher versions due to these overrides. And this pain is payed by us. Thanks.

    P.S. from documentation:

    /** * @cfg {String} align * Sets the alignment of the header and rendered columns. * Possible values are: `'left'`, `'center'`, and `'right'`. */
    developers just dream up not documented restrictions.

  5. #5
    Sencha User
    Join Date
    Apr 2013
    Posts
    137

    Default

    So how we can center it when the widget doesn't do it correctly?!

  6. #6
    Sencha User
    Join Date
    Mar 2011
    Location
    Arvada, CO
    Posts
    404

    Default

    Quote Originally Posted by Mahmoud690 View Post
    So how we can center it when the widget doesn't do it correctly?!
    It's recommended that you add a container with the proper layout (or you can set display inline-block for checkboxes/radiofields, but you must specify their width), like in this Fiddle. Note that if you add a container to a widget, you must supply rowViewModel, either was true or an empty object to make sure it gets populated for each row.

Similar Threads

  1. Access the rows record in a widgetcolumns widget?
    By Grizzler89 in forum Ext 5: Q&A
    Replies: 2
    Last Post: 29 Jun 2015, 1:03 PM
  2. Replies: 1
    Last Post: 24 May 2012, 11:03 PM
  3. Replies: 1
    Last Post: 17 Jun 2008, 9:25 PM
  4. Radio Button ALIGN horizontal
    By eclucas in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 Nov 2007, 5:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •