Topic: Button -> Tabsheet
Good morning everybody. Is it possible that when i press a button: a specific tabsheet on a specific pagecontrol on a specific form will open?
My Visual Database → General → Button -> Tabsheet
Good morning everybody. Is it possible that when i press a button: a specific tabsheet on a specific pagecontrol on a specific form will open?
Hello.
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form2.PageControl1.ActivePageIndex := 1; // 0 - first tab, 1 - second tab and so on...
end;
Hello Dmitry,
I have followed your advice on my project. However, I have found that the desired tab sheet does not always open when the button is clicked. Some buttons work, but others do not. Where am I going wrong? Please see the project.
Hello.
You have a pretty big project, please provide step by step instruction to reproduce the problem.
Solved it! The target tab was in a PageControl, which was inside another mother PageControl in the target form. So first the appropriate tab of the mother PageControl has to be opened, followed by the target tab of the child PageControl. Now every button working as desired.
My Visual Database → General → Button -> Tabsheet
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi