Results 1 to 3 of 3

Thread: How to dynamic change border color for region in Viewport

  1. #1

    Default How to dynamic change border color for region in Viewport

    I have a page with a Viewport with 3 regions (north,west and center). The users want's an indication of what region has focus. I want to make this indication by changing the border color for the region that has focus.

    So, How to dynamic change border color for region in Viewport?
    Thanks

  2. #2
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516

    Default

    You should probably be able to grab the Ext.Element for the region using the getEl() method.

    PHP Code:
    var northRegion = new Ext.Panel({...});

    ...

    var 
    northRegionEl northRegion.getEl(); //gives you an Ext.Element 
    The look at the API docs for Ext.Element
    - http://dev.sencha.com/deploy/dev/doc...ss=Ext.Element

    Use methods like addClass() or applyStyles() - and modify the border CSS.

    I'm just shooting-from-the-hip here... you have have to massage the code a bit to figure out the correct CSS property.

    Alternatively, you could use the Ext.Fx method:
    - http://dev.sencha.com/deploy/dev/docs/?class=Ext.Fx

    These methods are simply chained onto the Ext.Element we grabbed above.

  3. #3

    Default

    Thanks!
    I used the panel.el.addClassOnFocus function.

Similar Threads

  1. dynamic replace panel in border region
    By dave0224 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 5 Jan 2010, 5:43 PM
  2. FormPanel in Border Region, no ViewPort
    By Bucs in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 29 Jun 2009, 11:50 AM
  3. Replies: 3
    Last Post: 22 Jun 2009, 6:03 AM
  4. dynamic region adding in border layout
    By jojin in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 30 Jul 2008, 4:12 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
  •