Results 1 to 3 of 3

Thread: How to get 'overlay' effect without using 'overlay' config in titlebar?

  1. #1
    Sencha User
    Join Date
    Nov 2012
    Location
    India
    Posts
    25
    Vote Rating
    0
      0  

    Default Answered: How to get 'overlay' effect without using 'overlay' config in titlebar?

    I want image title to be shown over the image and for that I used a docked titlebar on top of image and made it transparent using CSS. My problem is {overlay : true} because of which I am getting these warnings:

    [DEPRECATE][Ext.Panel#doAdd] 'overlay' config is deprecated on docked items, please set the top/left/right/bottom configurations instead.

    I tried playing with top/left/right configs but still not able to get effect similar to overlay, can someone tell me how to do the same without using overlay?
    I am using Sencha Touch 2.1

    Here is code for panel:

    Code:
        {
            xtype: 'panel',
            layout: 'vbox',
            items : [{
                    xtype : 'toolbar',
                    title : titleStr,
                    docked : 'top',
                    overlay : true,
                    cls : 'x-toolbar-transparent-top'
            },{
                    xtype: 'image',
                    layout: 'fit',
                    flex : 1,
                    rec : data,
                    src : data.imageURL,
                    width : Ext.Viewport.getWindowWidth()*3/4,
            }
            }]
        }

  2. Docked items won't use the top/left/etc. You can undock it and use top/left and width to see if that works for you.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      1  

    Default

    Docked items won't use the top/left/etc. You can undock it and use top/left and width to see if that works for you.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Nov 2012
    Location
    India
    Posts
    25
    Vote Rating
    0
      0  

    Default

    Thanks Man!
    I did not know that docked items doesn't use top/left positioning
    It seems to be working fine
    Code:
                                   {
            				xtype : 'toolbar',
            				title : titleStr,
            				//docked : 'top',	// Docked removed because absolute positioning doesn't work with it and overlay is deprecated
            				top : 0,
            				left : 0,
            				width : Ext.Viewport.getWindowWidth()*3/4,
            				//overlay : true,
            				cls : 'x-toolbar-transparent-top'
            			}

Tags for this Thread

Posting Permissions

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