Solved

Alt+Tab between TTabSheets

Posted on 2004-05-01
5
234 Views
Last Modified: 2010-04-05
Hi guys,

I have 4 tabsheets lets say and I want to walk through them with Alt+Tab (Just Like Windows).
For example I first clicked on tabsheet 2 then 3 then 4. when I press Alt+Tab I want to go to 3 and if i press alt+tab again i want to goto 4.



Anyone knows anything?
0
Comment
Question by:bilgehanyildirim
5 Comments
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 10968403
just like windows ?
you're thinking about Ctrl+Tab and not Alt+Tab !
Ctrl+Tab works just fine
0
 

Author Comment

by:bilgehanyildirim
ID: 10968417
It goes in a row. I want to go back and forward. there are loads of copy/paste job to do from one TS to other one.
0
 
LVL 6

Expert Comment

by:pritaeas
ID: 10968768
Ctrl+Tab goes forward, Ctrl+Shift+Tab goes backward.

But you can always use shortcuts to go directly to a specific tab. E.g. you have a submenu containing your various tabsheets, then you can easily add a shortcut for each menu-item (Ctrl+1, Ctrl+2 and so on).

You can also use an ActionList, where each action sets a specific tabsheet. Then also set a shortcut for each action.

hth, pritaeas
0
 

Author Comment

by:bilgehanyildirim
ID: 10968924
I haven't use actionllist before. could you please give an example. for example lets say when I press Ctrl+Q TS 1 will be activated and when I press Ctrl+Q again TS 2 will be activated and so on..
0
 
LVL 4

Accepted Solution

by:
ceoworks earned 500 total points
ID: 10969308
Hi Bilgehan,

All you need to do is :

- Put an TActionList control(on Delphi's Standard tab) on your form
- Double click on your action list. Then ActionList editor will appear
- Add a new action from this editor
- When your new action is selected, from the object inspector define a name for this action and then select a ShortCut for this. I selected Ctrl+Q as you preferred.
- Then double click on your new action item and then put your code into that new action's OnExecute event :

  procedure TForm1.NextTabExecute(Sender: TObject);
  begin
    PageControl1.TabIndex := PageControl1.TabIndex + 1; // TabIndex shows the current active TabSheet at that time..
  end;

That's all.

Cheers,

Oktay Sancak
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML text in the body of an email (delphi code) 12 209
Dev Express grid collapse 2 47
DBGrid or StringGrid ? 6 119
Tidtcpserver listening on multiports? 1 41
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question