I am stuck with TPageControl, which exhibits strange behavior.
The control has 3 pages, but when I do
for I:=0 to PageControl.PageCount-1 do begin PageControl.Pages[I].TabVisible := False; PageControl.Pages[I].Visible := Ord(iColorScale.GenerationMode) = I; end;
I get an "index index beyond (3)" error when executing the first line of the first iteration of the loop equivalent
PageControl.Pages[0].TabVisible := False;
Now when I look at the PageControl properties in the debugger, everything seems to be in order. The PageCount value is expected to be 3, and I will see all pages and their properties, including TabVisible page 0, in the evaluation document
I am using Delphi XE on a Windows 7 machine. Does anyone have an idea what is going on? I'm at a loss.
delphi delphi-xe tpagecontrol
Bjarke moholt
source share