ExtJS extension vertical tabLayout implementation code_extjs
But the TabPanel in ExtJS can only be displayed horizontally. I searched the Ext forum and found that there is an extension of vertical TabLayout, but the tab content of the vertical tab is displayed horizontally, and even if there are too many tabs, it cannot be enabled by setting the enableScroll attribute. Scroll, in order to meet the needs of the project, I extended TabLayout to support vertical tab display and support scrolling of tabs when there are many tabs. The effect is as follows:
There are two ways to use this component, one is the extension method, the other is the copy method. The first method requires the introduction of TabPanel.js and ext-patch.css in the attachment. At the same time, the two images need to be placed in the same directory as ext-patch.css. When creating the component, you need to create Ext.ux.TabPanel;
Example:
aa = new Ext.ux.TabPanel ({
tabPosition: 'left',
autoScroll: true,
deferredRender: false,
activeTab: 0,
enableTabScroll: true,
applyTo: 'aaa',
items: [
bb = new Ext.Panel({layout:'fit',
title:'Basic information',
iconCls:'aaa',
closable: true,
html: 'Basic information'
}),cc = new Ext.Panel({layout:"fit",
title:"Basic information",
closable: true,
html: 'Basic Information'
})]
});
The second method requires the introduction of TabPanel2.js and ext-patch.css in the attachment, and the two images need to be placed in In the same directory as ext-patch.css, you need to create Ext.TabPanel when creating components.
Example:
aa = new Ext.TabPanel( {
tabPosition: 'left',
autoScroll: true,
deferredRender: false,
activeTab: 0,
enableTabScroll: true,
applyTo: 'aaa',
items: [
bb = new Ext.Panel({layout:'fit',
title:'Basic information',
iconCls:'aaa',
closable: true,
html : 'Basic information'
}),cc = new Ext.Panel({layout:"fit",
title:"Basic information",
closable: true,
html: 'Basic information '
})]
});
The two usage methods have the same effect, and the tabPosition attribute supports top/right/bottom/left at the same time.
Attachment file description:
TabPanel.js extends Ext.TabPanel
TabPanel2.js overrides the relevant methods in Ext.TabPanel
ext-patch.css css used in the component of this article
*.gif is the two scroll button images required when the enableScroll attribute is set
Package and download

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The SNMP extension for PHP is an extension that enables PHP to communicate with network devices through the SNMP protocol. Using this extension, you can easily obtain and modify the configuration information of network devices, such as CPU, memory, network interface and other information of routers, switches, etc. You can also perform control operations such as switching device ports. This article will introduce the basic knowledge of the SNMP protocol, how to install the SNMP extension of PHP, and how to use the SNMP extension in PHP to monitor and control network devices. 1. SN

From start to finish: How to use php extension cURL for HTTP requests Introduction: In web development, it is often necessary to communicate with third-party APIs or other remote servers. Using cURL to make HTTP requests is a common and powerful way. This article will introduce how to use PHP to extend cURL to perform HTTP requests, and provide some practical code examples. 1. Preparation First, make sure that php has the cURL extension installed. You can execute php-m|grepcurl on the command line to check

To extend PHP function functionality, you can use extensions and third-party modules. Extensions provide additional functions and classes that can be installed and enabled through the pecl package manager. Third-party modules provide specific functionality and can be installed through the Composer package manager. Practical examples include using extensions to parse complex JSON data and using modules to validate data.

1.UncaughtError:Calltoundefinedfunctionmb_strlen(); When the above error occurs, it means that we have not installed the mbstring extension; 2. Enter the PHP installation directory cd/temp001/php-7.1.0/ext/mbstring 3. Start phpize(/usr/local/bin /phpize or /usr/local/php7-abel001/bin/phpize) command to install php extension 4../configure--with-php-config=/usr/local/php7-abel

How to use the Aurora Push extension to implement batch message push function in PHP applications. In the development of mobile applications, message push is a very important function. Jiguang Push is a commonly used message push service that provides rich functions and interfaces. This article will introduce how to use the Aurora Push extension to implement batch message push functionality in PHP applications. Step 1: Register a Jiguang Push account and obtain an API key. First, we need to register on the Jiguang Push official website (https://www.jiguang.cn/push)

PHP is a popular server-side language that can be used to develop web applications and process files. The ZipArchive extension for PHP is a powerful tool for manipulating zip files in PHP. In this article, we’ll cover how to use PHP’s ZipArchive extension to create, read, and modify zip files. 1. Install the ZipArchive extension. Before using the ZipArchive extension, you need to ensure that the extension has been installed. The installation method is as follows: 1. Install

The POSIX extensions for PHP are a set of functions and constants that allow PHP to interact with POSIX-compliant operating systems. POSIX (PortableOperatingSystemInterface) is a set of operating system interface standards designed to allow software developers to write applications that can run on various UNIX or UNIX-like operating systems. This article will introduce how to use POSIX extensions for PHP, including installation and use. 1. Install the POSIX extension of PHP in

With the development of PHP and the continuous expansion of application scenarios, Phar extension has become an important part of PHP programming. Phar is the abbreviation of PHPArchive, which can package multiple PHP files and resources into a single file for easy distribution and management. This article will introduce how to use PHP's Phar extension for packaging and management. Installing the Phar extension First, we need to check whether PHP has the Phar extension installed. Under Linux, enter the following command through the terminal: php -m
