Hi all,
I've added a new unit to my app that functions as a help screen. As my main unit is one huge tabsheet with about 70 tabs, the help screen needs to read which tab is active, and then bring up its own corresponding help tab.
Just as a made-up example, supposing the user is on the 'vegetables' tab in the main screen, when the user opens the help screen from the menubar, it needs to be on the vegetables help screen.
Definitely not the most efficient way of doing it, but this is what I've come up with for the moment.
procedure TForm1.ShowQuestionsPromptClick(Sender: TObject);
begin
if HelperScreen.visible = false then
begin
if MainScreen.ActivePage = Vegetables then HelperScreen.HelperScreenPages.ActivePage := VegetablesHelp;
// and so on for all the other tabs on the main screen.
HelperScreen.visible :=true;
end
else
if HelperScreen.visible = true then HelperScreen.visible :=false;
end;
The HelperScreen, unit 2, shows and hides with no problems. I have also been able to successfully change the properties of a label object on the HelperScreen, from the main screen, unit 1 - which is proof of concept. But when I try and change the ActivePage of the tabsheet on the HelperScreen, it complains that there is no identifier VegetablesHelp. Which there is.
Any thoughts? Thanks