[CLOSED] How to apply css on component FieldLabel

  1. #1

    [CLOSED] How to apply css on component FieldLabel

    Hi,
    I want to apply this style
    font-weight: bold;
    on textfield but it doesn't work.
    This is the code used:
    txtField.LabelStyle="font-weight: bold;"
    Last edited by Daniil; Dec 11, 2013 at 8:45 AM. Reason: [CLOSED]
  2. #2
    Hello!

    Try the following:

    <style>
        .ux-bold .x-form-text, .ux-bold .x-form-item-label {
            font-weight: bold;
        }
    </style>
            
    <ext:TextField ID="TextField1" runat="server" Cls="ux-bold" FieldLabel="Test" FieldCls="ux-bold">
    </ext:TextField>
  3. #3
    Sorry, the previous example was for 2.x.

    Basically, what you need to do, it to put the TextField in a Panel with FormLayout:

    <ext:Panel runat="server" Layout="Form">
        <Items>
            <ext:TextField ID="TextField1" runat="server" FieldLabel="Test" LabelStyle="font-weight: bold;">
            </ext:TextField>
        </Items>
    </ext:Panel>
  4. #4
    Thank you it works.

Similar Threads

  1. Replies: 2
    Last Post: Jun 27, 2013, 10:18 PM
  2. Replies: 8
    Last Post: Feb 06, 2013, 6:27 PM
  3. Add Ext JavaScript Component to Component
    By geoffrey.mcgill in forum Examples and Extras
    Replies: 3
    Last Post: Mar 10, 2010, 12:38 PM
  4. [CLOSED] [1.0] EditableGrid Apply to selection apply to all
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 24, 2010, 5:49 PM
  5. Replies: 1
    Last Post: May 22, 2009, 7:38 AM

Posting Permissions