1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    4
    Vote Rating
    0
    firstlove88 is on a distinguished road

      0  

    Default Answered: Viewport dosent show panel's content unless refresh/resize page.

    Answered: Viewport dosent show panel's content unless refresh/resize page.


    Hi all,

    I have a image inside my panel on my application and it only appear after i resize or refresh the window page.
    Just a bit more information on my panel, my viewport will call for the panel to display at the 'north' region. And in my 'north' region, there's 2 items, a toolbar and then this panel which is not displaying the image unless i refresh/resize the page.

    Here's my code for the panel:

    Code:
    var banner = Ext.create ('Ext.panel.Panel', {
    
    html: '<img src =\'resources/background.jpg\'></img>
    layout: 'fit' 
    });
    I've tried banner.dolayout() but its not working.


    Here's my code for the viewport which will display the panel in the north region :

    Code:
    Ext.create('Ext.container.Viewport', {
    layout: 'border',
    items: [{
    
    region: 'north',
    items" [header, banner]
    },.....]
    });

  2. Try putting height/width attribs / style on the img tag and see if that works.

  3. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Try putting height/width attribs / style on the img tag and see if that works.

  4. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    4
    Vote Rating
    0
    firstlove88 is on a distinguished road

      0  

    Default


    Hi,

    Thanks for the reply! It does work!

    But i've another consideration which is if i set a fix height and width, does it mean my that image would not fit to screen if its shown on other monitor of different resolution as i've fixed the height and width.

    Is there anyway to solve this problem?

  5. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Try height:100% and width:100%

  6. #5
    Sencha User
    Join Date
    Jan 2013
    Posts
    4
    Vote Rating
    0
    firstlove88 is on a distinguished road

      0  

    Default


    The panel does not display the image unless refresh/resize the window again.

    Any idea is it panel problem or is there other component that i can use to display a image?

  7. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,913
    Answers
    371
    Vote Rating
    179
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Closest thing I can think is to add a load listener to the image and once it loads do an updateLayout() on the panel its in.

  8. #7
    Sencha User
    Join Date
    Jan 2013
    Posts
    4
    Vote Rating
    0
    firstlove88 is on a distinguished road

      0  

    Default


    I just solved it by setting the width to auto, and i just set a value to the height. It still works.

    So i guess its not a issue now for taller monitor as my concern was with the width of the image rather than the height of the image. .

    Thanks!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi