If a page has not been shown before an error occurs unless I add the constant.
What would be a more correct way of doing the test below?

procedure Tmainform.TabSheet2Show(Sender: TObject);
const TSshown: word = 0;
begin
  if TSshown = 0 then
  begin
    TSshown := 1;
    exit;
  end;
  if Listbox.Items.Count > 0 then Listbox.Selected[0] := false;
end;



_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to