This is only part of a larger project. I have a text box on a form and when the command button next to it is clicked, I want to bring up a form that looks aligned to the text box. The idea is to make it look like a drop-down box. But the only thing is that this 'drop-down' is another form and a modal one.
This is what I've done so far and the form shows fine.
procedure TfrmSetupTaxes.cmdChangeParentClick(Sender: TObject);
var
Res : Integer;
frmPopUp : TForm;
begin
frmPopUp := TfrmTreePopUp.Create(nil);
frmPopUp.Parent := Self;
frmPopUp.Top:= self.rp.Top + self.EditItemCat.Top +
self.txtSelParentName.Top + self.txtSelParentName.Height + 3;
frmPopUp.Left:= self.rp.Left + self.EditItemCat.left + self.txtSelParentName.Left;
Res := frmPopUp.ShowModal;
end;
Note: 'rp' is a panel and 'EditITemCat' is a tabsheet. These are merely used for positioning.
Now, here's my problem...
Although the form shows up, it seems frozen. It does not respond, neither does the parent form. Since I'm on the IDE, I just close it.
Can someone please show me what I'm missing here?
Thanks!