1

Topic: The general events for several TabSheet

On the form it is allocated PageControl with several TabSheet ... For example them N - pieces
It is necessary to fulfill certain actions on event - it is clicked on "back" TabSheet - it will be visible " OnEnter ", i.e. at Focus obtaining!?
Thus for each of available TabSheet - the dial-up of operators should be individual.
Question:
1. Whether event " OnEnter " on click on "back" is correctly selected?
2. How it is better to implement? (Variants more low) see
Var-1 : to Write and appropriate procedures on event for everyone TabSheet , i.e. N - procedures;
(A variant certainly idle time...)
Var-2 : to Write One  for all TabSheet procedure, where already inside to clarify - which of them received focus and to pass to the unit fulfilling the necessary instructions (There and then in procedure).
(How in this case to make more refined - determination TabSheet , received focus and to fulfill the necessary?)

2

Re: The general events for several TabSheet

Event OnChange and there to look pageControl. ActivePage

3

Re: The general events for several TabSheet

In general while so...
The general processing procedure turned out such:
[quote =]

procedure TMainForm. TabSheetFocusAll (Sender: TObject);
begin
case PageControl. ActivePageIndex of
0: begin
MessageDlg (' the tab No 0 ' Is active);
...
end;
1: begin
MessageDlg (' the tab No 1 ' Is active);
...
end;
2: begin
MessageDlg (' the tab No 2 ' Is active);
...
end;
3: begin
MessageDlg (' the tab No 3 ' Is active);
...
end;
4: begin
MessageDlg (' the tab No 4 ' Is active);
...
end;
end;

(Where instead of "... " the individual code for everyone TabSheet ) follows
On event "OnEnter" tabs TabSheet the given procedure why that was not fulfilled. (((
Therefore reassigned on event "OnShow" each of tabs... Works!!!
...

krapotkin wrote:

event OnChange and there to look pageControl. ActivePage

I will try to make as prompted krapotkin :
- I will delete links in tabs on event "OnShow";
- I will deliver in most PageControl on event OnChange .
...