[CLOSED] TextField bgcolor highlight

  1. #1

    [CLOSED] TextField bgcolor highlight

    Hi all,

    it would be nice having two properties for TextField (and for controls that inherites from it)
    for setting the background color when control get focus.

    - boolean HighLight (default to false, or default to true with color set via code according to the active theme)
    - string HighLightBgColor (#FFFF00)

    Thanx

    Matteo
  2. #2

    RE: [CLOSED] TextField bgcolor highlight

    Hi Matteo,

    This is a pretty easy feature to manually implement by calling the .addClassOnFocus function during <Render>.

    Example

    <style type="text/css">
        .highlight {
            background-color: #ffff00;
        }
    </style>
    
    <ext:TextField ID="TextField1" runat="server">
        <Listeners>
            <Render Handler="el.getEl().addClassOnFocus('highlight');" />
        </Listeners>
    </ext:TextField>
    I'm not sure adding extra properties would be worth the added weight of the JavaScript required configure this functionality client-side.

    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] TextField bgcolor highlight

    ok... I'm loosing it...

    There's already a .FocusClass property on the <ext:TextField>.

    The sample I posted above can be reproduced with the following code.

    Example

    <ext:TextField runat="server" FocusClass="highlight" />
    There's also several other *Class related properties which function in a similar way.

    ClearCls
    DisabledClass
    EmptyClass
    FieldClass
    FocusClass
    InvalidClass
    OverCls

    Hope this helps.

    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] TextField bgcolor highlight

    Hi Geoff,

    all right, thank you

    Matteo

Similar Threads

  1. [CLOSED] Highlight search results
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 21, 2012, 7:58 PM
  2. Replies: 2
    Last Post: Jun 07, 2012, 4:29 PM
  3. [CLOSED] Treegrid - row highlight colour
    By fordprefect in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2011, 8:27 PM
  4. [CLOSED] Highlight a Button upon action
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 23, 2011, 2:58 PM
  5. [CLOSED] How to highlight menuitem in Menupanel
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 06, 2011, 3:24 PM

Posting Permissions