Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: Help

Reply
 
Thread Tools
  #1  
Old 11-05-2009, 04:45 AM
pawanspace pawanspace is offline
Ext User
 
Join Date: Nov 2009
Posts: 4
pawanspace is on a distinguished road
Default Navigating tabs using Navigation keys.

Hi All,

I am new to extjs. I have a requirement where I would like to navigate tabs using navigation keys. For example I am on the first tab and now when I will press right button on my key board it should navigate to the next tab. Let me know if any one can suggest me any solution.

Regards,
Pawan Chopra.
Reply With Quote
  #2  
Old 11-05-2009, 06:36 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

The right arrow?

But when you say "on" a tab, an HTML element which can hold focus must be focussed.

Eg: an <input> or an <a> or a <button>

But if it's an <input>, surely you want right arrow to work as the user expects?

So, rethink your requirements, then look at http://www.extjs.com/deploy/ext-3.0-...el&member=keys

But remember, the user must have focussed an item within that TabPanel. You can't just think that you are "on" a tab, and have a key work.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #3  
Old 11-05-2009, 08:21 AM
pawanspace pawanspace is offline
Ext User
 
Join Date: Nov 2009
Posts: 4
pawanspace is on a distinguished road
Default

Thanks I am able to navigate tabs using keyMap. But if you will look at the second portion of code I am also having subtabs in some tabs. I am not able to navigate them as I am getting activeTab from the main tab and that active tab dos not have any method which can tell me about the sub tabs. Any idea on this?

var map = new Ext.KeyMap(document, {
		key: [Ext.EventObject.LEFT, Ext.EventObject.RIGHT],
		ctrl: false,
		fn: switchTabs
	});


var tabs = new Ext.TabPanel({
		id:'tabpanel',
	    	renderTo: 'toolbar',
	    	activeTab: 0,
	    	autoWidth:true,
	    	border:true,
	    	items: [
		            {		
		                id: 'listmanagement.json1',
						title: CW.tablabel.tab1
						,xtype: 'toolbar'
						,border: false
						//,style: 'background:gray;border:none;'
						,style: 'border:none;'
						,listeners: {activate: rlistlistemp},
	
						items: [	
								getDefaultSubTab(subTab1),                                                                        
								subscriberblacklistsep,
								getSubTab(subTab2),
								adminblacklistsep,
								getSubTab(subTab3),
								historyblacklistsep,
								getSubTab(subTab4),
								whitelistsep,
								getSubTab(subTab5)
							   ]
					},
					getTabWithoutSubTab(tab2),
					getTabWithoutSubTab(tab3),
					getTabWithoutSubTab(tab4),
					{
					    id: 'administration.json1',
						title: CW.tablabel.tab5,
						xtype: 'toolbar',
						border: false,
						//style: 'background:gray;border:none;',
						style: 'border:none;',
	       				listeners: {activate: ssettinglistemp},
						items: [	
									getDefaultSubTab(subTab6),
									applicationConfsep,
									getSubTab(subTab7),
									manageusersep,
									getSubTab(subTab8),
									managerolesep,
									getSubTab(subTab9)
								]
					  }
			       ]
	    });
Regards,
Pawan Chopra.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 10:12 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.