right...last question today, promise. ;-)
the application i'm doing requires several very different screens on the same form. to get round this i thought to set up a case statement as so..
---
case section of
0: begin
Form1.MainMenu1.items[1].Enabled := False;
Form1.MainMenu1.items[2].Enabled := False;
edit1.visible := false;
button1.visible := true;
end;
1: begin
Form1.MainMenu1.items[1].Enabled := True;
Form1.MainMenu1.items[2].Enabled := True;
edit1.visible := true;
button1.visible := false;
end;
end;
---
where section is a variable that changes according to which section of the program the user is in. (this is obviously going to get a lot more complex).
anyway - the problem i'm belatedly faced with is how to execute this bit of code. originally thought to put it in the procedure TForm1.FormCreate but i've seen the error of doing that.
so, is what i'm describing possible or am I being a bit naive/inexperienced/stupid etc?
cheers.
the application i'm doing requires several very different screens on the same form. to get round this i thought to set up a case statement as so..
---
case section of
0: begin
Form1.MainMenu1.items[1].Enabled := False;
Form1.MainMenu1.items[2].Enabled := False;
edit1.visible := false;
button1.visible := true;
end;
1: begin
Form1.MainMenu1.items[1].Enabled := True;
Form1.MainMenu1.items[2].Enabled := True;
edit1.visible := true;
button1.visible := false;
end;
end;
---
where section is a variable that changes according to which section of the program the user is in. (this is obviously going to get a lot more complex).
anyway - the problem i'm belatedly faced with is how to execute this bit of code. originally thought to put it in the procedure TForm1.FormCreate but i've seen the error of doing that.
so, is what i'm describing possible or am I being a bit naive/inexperienced/stupid etc?
cheers.