Topic: ParentComboBox
Hi can we set ParentComboBox by script , and not using the tool bar?
My Visual Database → General → ParentComboBox
Hi can we set ParentComboBox by script , and not using the tool bar?
The question is not clear. Expand the topic wider))
See please the picture. Is there a way to do that by script ?
I cannot find or test the Property for the ParentCombobox.
dbFilter is a better workaround for me. It's powerful and can be used in so many way.
procedure Form1_cbA_OnChange (Sender: TObject);
begin
if (Form1.cbA.ItemIndex = -1) then Form1.cbB.Enabled := False
else
begin
Form1.cbB.Enabled := True;
Form1.cbB.dbFilter := 'id_a='+Form1.cbA.sqlValue;
Form1.cbB.dbUpdate;
end;
end;
Thank you... I need it because I like to have two choices for a search button. A free choice (without parent... don't know how else to say it) and a choice with patent. Another stupid question is how to stop having the parent in this sample , so to return to the "free choice". Sorry for my bad English and for those ....stupid questions.....thanks again.
Thank you... I need it because I like to have two choices for a search button. A free choice (without parent... don't know how else to say it) and a choice with patent. Another stupid question is how to stop having the parent in this sample , so to return to the "free choice". Sorry for my bad English and for those ....stupid questions.....thanks again.
procedure Form1_cbA_OnChange (Sender: TObject);
begin
if (Form1.cbA.ItemIndex > 0) then Form1.cbB.dbFilter := 'id_a='+Form1.cbA.sqlValue else Form1.cbB.dbFilter := '';
Form1.cbB.dbUpdate;
end;
Thank you all....great job
See please the picture. Is there a way to do that by script ?
frmMain.ComboBox2.dbParentCombo := 'ComboBox1';
Hi k245 in case I like to cansel it ?
I do the following script but it doesn't work. Any idea???
if Form1.CheckBox5.Checked = true then
begin
//with Parent
Form1.ComboBox3.dbParentCombo := 'ComboBox2';
Form1.ComboBox4.dbParentCombo := 'ComboBox3';
Form1.ComboBox5.dbParentCombo := 'ComboBox4';
Form1.ComboBox3.DoOnChange;
Form1.ComboBox4.DoOnChange;
Form1.ComboBox5.DoOnChange;
Form1.CheckBox5.Caption:='Free search';
end;
if Form1.CheckBox5.Checked = false then
begin
//Without Parent
Form1.ComboBox3.dbParentCombo := '';
Form1.ComboBox4.dbParentCombo := '';
Form1.ComboBox5.dbParentCombo := '';
Form1.ComboBox3.DoOnChange;
Form1.ComboBox4.DoOnChange;
Form1.ComboBox5.DoOnChange;
Form1.CheckBox5.Caption:='Normal searh';
end;
try Form1.ComboBoxХ.dbUpdate for reload data in combo
try Form1.ComboBoxХ.dbUpdate for reload data in combo
thank's
My Visual Database → General → ParentComboBox
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi