Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: DisplayField - Field Style not working

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    714
    Vote Rating
    235
      0  

    Default DisplayField - Field Style not working

    Hi,

    Closed bug here (EXTJSIV-5242) - http://www.sencha.com/forum/showthre...n-DisplayField is an issue / not fixed in

    Release Notes for Ext JS 4.1.0 RC 3
    Release Date: April 10, 2012
    Version Number: 4.1.0 RC 3

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,389
    Vote Rating
    497
      0  

    Default

    In reviewing the ticket, this is marked as closed, Won't fix.

    Reason:
    fieldStyle is used to apply a style to the underlying input element. field.Display doesn't have one of these.

    Can you use this instead?

    Code:
            { 
                xtype : 'displayfield', 
                style : 'background-color:#FF0000', 
                value : 'Some Text...' 
            }
    Regards,
    Scott.

  3. #3
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    714
    Vote Rating
    235
      0  

    Default

    Hi Scott,
    That doesn't work either - ExtJS 4.0.7 style and fieldStyle cause the value text to be red.
    Are you saying that the 4.0.7 implementation was incorrect?

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,389
    Vote Rating
    497
      0  

    Default

    In talking with the developer, he mentioned that he will revisit this ticket ... as it should be trivial.

    Scott.

  5. #5
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    714
    Vote Rating
    235
      0  

    Default

    Thanks Scott appreciated

  6. #6
    Sencha Premium User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Goinia - GO, Brazil
    Posts
    639
    Vote Rating
    49
      0  

    Default

    Quote Originally Posted by scottmartin View Post
    In reviewing the ticket, this is marked as closed, Won't fix.

    Reason:
    fieldStyle is used to apply a style to the underlying input element. field.Display doesn't have one of these.

    Can you use this instead?

    Code:
            { 
                xtype : 'displayfield', 
                style : 'background-color:#FF0000', 
                value : 'Some Text...' 
            }
    Regards,
    Scott.
    style only apply to the label, how to style the value?
    Wemerson Januario
    Site/Blog: http://wemersonjanuario.com.brFrom: Goinia, GO, Brazil
    Consulting Training and Web Development

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,389
    Vote Rating
    497
      0  

    Default

    To change the style of the input field (value), you can use fieldCls. Is this what you meant?

    Regards,
    Scott.

  8. #8
    Sencha Premium User suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    714
    Vote Rating
    235
      0  

    Default

    As Scott suggested to style the value in 4.1 use fieldCls.
    This is preferable to using inline styling which is effectively what the use of style and fieldStyle gives you.

    However the inline styling should still work (style and field style) - not a biggy in the world of EXTJS bugs but never the less a bug

  9. #9
    Sencha User
    Join Date
    Feb 2013
    Posts
    5
    Vote Rating
    0
      0  

    Default Style applies partially

    Hi - I tried you suggestions and was able to set the testfield's value background color

    {
    ...
    cls: 'noneEditableTextField'
    }

    and in the .css
    .noneEditableTextField .x-form-field {
    background-color: #00ffff;
    }

    the result I got is the the value field is partially colored - any idea?

    thanks
    Charlie

    sencha-text-field-bgcolor.PNG

  10. #10
    Sencha User
    Join Date
    Feb 2013
    Posts
    5
    Vote Rating
    0
      0  

    Default

    ok fixed it



    .noneEditableTextField .x-form-text {
    background-image: none;
    background-color: #efefef;
    }

Page 1 of 2 12 LastLast

Posting Permissions

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