[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
hotkeys and tabbedpanetabs  XML
Forum Index -> Community
Author Message
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

I have a tabbedPane with some tabbedpanetabs. In each tab, there is a button to preview a document. The hotkey is always (ctrl-p). When I hit (ctrl-p), the listeners in *all* tabs are alerted, so in each tab a document is loaded.

Of course, I would like that only the current tab listens to the hotkey or at least that I could know the current tab to avoid the action in the other tabs. What would be the best solution?

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

the following should work: define the POPUPMENU for hot key not on TABBEDPANE level but on each TABBEDPANETAB level - then the corresponding action listener of TABBEDPANETAB should be called.

Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

The hotkey is defined through the button's attribute "hotkey". Each Button is inside the corresponding tabbedpanetab.

I suppose you are writing about an alternative way to define hotkeys: with popupmenu. I never used this. Is there somewhere a description about it?

Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

...yes, it's in the developer's guide.

Other possibility for you: you can tell the TABBEDPANE that it writes back the current tab-position (0,1,2,...). TABBEDPANE-VALUE is the corresponding attribute. Then you know where the user currently is - any only invoke this preview, that fits to the selected tab.

Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

CaptainCasa wrote:
...yes, it's in the developer's guide.
 

And also in the Demo Workplace!
[WWW]
 
Forum Index -> Community
Go to:   
Powered by JForum 2.1.6 © JForum Team