Hi Guys,
Thank you very much.................
What I was trying to do is disabling the click of tab itself in a multi tabs situation. User sees all available tabs but cannot click other than predefined tab with something like
Form2.pagecontrol1.ActivePageIndex := 1;
Form2.TabSheet0.Enabled := False;
Form2.TabSheet2.Enabled := False;
Form2.TabSheet3.Enabled := False;
Perhaps it's not possible...
Derek, I added radio button simulation for the checkboxes so that only one can be selected.
procedure Form1_CheckBox1_OnClick (Sender: string);
begin
if form1.checkbox1.checked = true then form1.tabsheet1.enabled := false else form1.tabsheet1.enabled := true;
Form1.CheckBox2.Checked := False;
Form1.CheckBox3.Checked := False;
end;
procedure Form1_CheckBox2_OnClick (Sender: string);
begin
if form1.checkbox2.checked = true then form1.tabsheet1.tabvisible := false else form1.tabsheet1.tabvisible := true;
Form1.CheckBox1.Checked := False;
Form1.CheckBox3.Checked := False;
end;
procedure Form1_CheckBox3_OnClick (Sender: string);
begin
if form1.checkbox3.checked = true then form1.tabsheet1.visible := false else form1.tabsheet1.visible := true;
Form1.CheckBox2.Checked := False;
Form1.CheckBox1.Checked := False;
end;
How can I use multiple statements with and in one line something like below which doesn't work:
procedure Form1_CheckBox1_OnClick (Sender: string);
begin
if form1.checkbox1.checked = true then form1.tabsheet1.enabled := false else form1.tabsheet1.enabled := true;
//Form1.CheckBox2.Checked := False;
//Form1.CheckBox3.Checked := False;
(Form1.CheckBox2.Checked) and (Form1.CheckBox3.Checked) := False;
end
Is it possible to use more than one and on same line?
Adam
God... please help me become the person my dog thinks I am.