You Are Here:

Community: Developer Discussion Boards

#1 Old How to Switching between tabs without pressing a navigation keys? - 2008-08-14, 18:54

Join Date: May 2008
Posts: 15
Xurde
Offline
Registered User
Hi there,

I'm writing a program with tabs. In some cases, after an user action I'd want to show a different tab from which the user made that action. I'm able to show the body of that tab, but I can't get the desired "tab title" selected.

I'll try to explain it with a simple example, just in case:

I've got 2 tabs: "Name" (which body is a query to enter your name")
and "Menu" (which body offers you some information or whatever).
If you enter a user name = "Paco" the program should show switch to the second tab, showing the information. As I said before, I can show the body (information) but the selected tab keeps on being the first one.

Thanks!
Reply With Quote

#2 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-14, 19:50

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi Xurde
i thing you can do that without having a problem have a look at this.
Moreover it will be better if you post a little bit of code at the dibo if you dont mind that.

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Last edited by gaba88 : 2008-08-14 at 19:55.
Reply With Quote

#3 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-14, 20:11

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi Xurde
i just clicked one more thing that only you can change or navigate from one tab to another using the navigation keys so it will be good if don t use the tabs in this kind of a design.

Hope you got this
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#4 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-16, 13:54

Join Date: May 2008
Posts: 15
Xurde
Offline
Registered User
Hi gaba88,

the example I wrote was just a simple example. My program is kind of complex and I designed it for tab navigation (and it should be like this, because otherwise it wouldn't be easy-to-use). So, my question is, if you just can navigate with navigation keys, could I force it by simulating that key pressing?

Thanks
Reply With Quote

#5 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-16, 14:10

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Yes, you can simulate pressing the arrow keys to navigate through the tabs.
Reply With Quote

#6 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-16, 14:58

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by bogdan.galiceanu View Post
Yes, you can simulate pressing the arrow keys to navigate through the tabs.
From PyS60 v1.4.2 documentation (page 18):

Quote:
Instances of Application type have the following methods:

activate tab(index)

Activates the tab index counting from zero.
Is this not working?
Reply With Quote

#7 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-16, 15:05

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Is there something wrong with what I said? I tried simulating the right arrow and it switched to the next tab.

Oh and "activate tab(index)" should be "activate_tab(index)".
Reply With Quote

#8 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-16, 15:16

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by bogdan.galiceanu View Post
Is there something wrong with what I said?
Not at all, I just find simulating keypresses a little "hackish".


Quote:
Originally Posted by bogdan.galiceanu View Post
Oh and "activate tab(index)" should be "activate_tab(index)".
Looks like copying from a PDF loses the underscore.
Reply With Quote

#9 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-17, 19:51

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by jethro.fn View Post
Not at all, I just find simulating keypresses a little "hackish".
I agree, appuifw.app.activate_tab(index) works just fine. No need to simulate any keypress, even if that does work. Simple is better.

Btw I have one problem with tabs. When I exit the script, tabs remain visible in python shell! Bug maybe? I solved that by removing tabs at my exit routine..

Cheers,

--jouni
Reply With Quote

#10 Old Re: How to Switching between tabs without pressing a navigation keys? - 2008-08-17, 20:03

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi Jouni
yes you are correct i also observed that and is it a bug???

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigation tabs corrupted nadav70 Symbian User Interface 5 2009-03-11 07:59
Navigation Tabs (or Tabs Pane) in J2ME/Series 60 shadisky Mobile Java Media (Graphics & Sounds) 0 2005-05-05 20:48
Navigation Tabs (or Tabs Pane) in J2ME/Series 60 shadisky Mobile Java General 0 2005-05-05 20:43
Make the Navigation Tabs Invisible yfho General Symbian C++ 1 2004-01-15 12:47
Navigation pane and arrow keys rikymalti1 Symbian User Interface 0 2003-10-07 16:51

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia