2016-04-07 9 views
8

Ich habe ein Ext-Fenster mit zwei Elementen Container und Fieldset. Für Container und Fieldset bekomme ich Daten in Form von HTML vom Server.ExtJS Vertikale Bildlaufleiste passt nicht für lange JSON-Daten

Wenn diese Daten groß sind, scheint die Bildlaufleiste nicht vollständig durch den Text zu navigieren.

Wie kann ich eine vertikale Bildlaufleiste in diesem Bereich richtig konfigurieren?

Mein Beispielcode ist:

Ext.create('Ext.window.Window', { 
    title: 'DataSet', 
    bodyPadding: 5, 
    modal: true, 
    height: 600, 
    width: 900, 
    layout: 'fit', 
    items: { 
     xtype: 'form', 
     items: [{ 
      xtype: 'container', 
      html: jsonData.R.ErrorMsg || '' 
     }, { 
      xtype: 'fieldset', 
      padding: '5 0 10 0', 
      collapsible: true, 
      title: 'Description', 
      autoScroll: true, 
      height: 580, 
      width: 880, 
      collapsed: true, 
      overflowY: 'scroll', 
      html: Ext.String.htmlEncode(jsonData.R.ErrorDesc) || '' 
     }] 
    } 
}) 
+0

eine Geige Marke: https://fiddle.sencha.com/ mit den Beispieldaten. –

Antwort

0

Sie versuchen, diese seine Arbeit Ext.create ('Ext.window.Window', { Titel: 'DataSet', bodyPadding: 5,

Ext.create('Ext.window.Window', { 
 
    title: 'DataSet', 
 
    bodyPadding: 5, 
 
    modal: true, 
 
    height: 600, 
 
    width: 900, 
 
    layout: 'fit', 
 
    items: { 
 
     xtype: 'form', 
 
     items: [{ 
 
      xtype: 'container', 
 
      html: jsonData.R.ErrorMsg || '' 
 
     }, { 
 
      xtype: 'fieldset', 
 
      padding: '5 0 10 0', 
 
      collapsible: true, 
 
      title: 'Description', 
 
      height: 580, 
 
      width: 880, 
 
      collapsed: true, 
 
      overflowY: 'scroll', 
 
      html: Ext.String.htmlEncode(jsonData.R.ErrorDesc) || '' 
 
     }] 
 
    } 
 
})

+0

Ja, ich habe autoScroll entfernt: true, Es wird ein vertikaler Balken angezeigt, der jedoch nicht für vollständige Daten angezeigt wird. Es wird in der Höhe 580 für Container fest. – UDID

0

Fieldset ist nicht soll ein Formularelement sein (Anzeige von HTML), Es ist ein Container für GruppierungSätze von Feldern gemeint.

ein Fieldset Erstellen mit Kind Artikel Textbereich oder Textfeld

Ext.create('Ext.window.Window', { 
 
    title: 'DataSet', 
 
    bodyPadding: 5, 
 
    modal: true, 
 
    height: 600, 
 
    width: 900, 
 
    layout: 'fit', 
 
    items: { 
 
     xtype: 'form', 
 
     items: [{ 
 
      xtype: 'container', 
 
      html: jsonData.R.ErrorMsg || '' 
 
     }, { 
 
      xtype: 'fieldset', 
 
      
 
      collapsed: true, 
 
      overflowY: 'scroll', 
 
      items: [ 
 
      { 
 

 
       xtype: 'textfield', 
 
       padding: '5 0 10 0', 
 
       collapsible: true, 
 
       title: 'Description', 
 
       height: 580, 
 
       width: 880, 
 
       itemId: 'errorDesc', 
 
       name: 'errorDesc', 
 
       fieldLabel: 'Error Desc', 
 
       value: Ext.String.htmlEncode(jsonData.R.ErrorDesc) || '' 
 
      } 
 
     }] 
 
    } 
 
})

Verwandte Themen