简体   繁体   English

如何使用sencha touch显示和隐藏分页工具栏?

[英]How to show and hide paging toolbar using sencha touch?

I have small requirement ie PDFViewer in sencha touch, default paging toolbar is hidden.Once we click on pdf document the paging toolbar is showned, remaining time it is hidden.Here my problem is paging toolbar is not showned and hidden. 我的需求很小,即sencha touch中的PDFViewer,默认的分页工具栏是隐藏的。一旦我们单击pdf文档,则会显示分页工具栏,剩余时间被隐藏。这里我的问题是分页工具栏没有显示和隐藏。 I tried the following code.Can you please suggest me. 我尝试了以下代码。能否请你建议我。 Here is my code 这是我的代码

samplePdf = {
 xtype : 'pdfpanel',
 id: 'pdfViewer', src :'http://cdn.mozilla.net/pdfjs/tracemonkey.pdf',
 scrollable: true,
 hidePagingtoolbar: false,
 listeners: {
      tap: {
          fn: function() {
                paging = Ext.getCmp('pdfViewer');
                if(samplePdf.hidePagingtoolbar==false){
                  hidePagingtoolbar:true
                 //Ext.getCmp('pdfViewer').hidePagingtoolbar.hide();
                }
                else{ 
                 hidePagingtoolbar: true;
                }
              },
     element: 'element'},}};

Thanks, Rajasekhar. 谢谢,拉贾塞卡。

I suggest using the "getter/setter" of the "HidePagingtoolbar" object eg 我建议使用“ HidePagingtoolbar”对象的“ getter / setter”,例如

listeners: {
  tap: {
      fn: function() {
            paging = Ext.getCmp('pdfViewer');
            paging.setHidePagingtoolbar(!paging.getHidePagingtoolbar());
          }
    }
}

That should toggle the HidePaggingToolbar flag. 那应该切换HidePaggingToolbar标志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM