Select items from another forms listview while modal window is opened
I have a problem and this is little bit difficult explain, but I try.
I have a application's main window. And on this main window I have a popup dialog (another form containing listview) with customers. If I type on the main window's textbox then it pops up and automatically fills data depending on what I type. And I can select items from there by clicking mouse on item or by pressing arrow and enter keys.
Now I added new modal dialog to main window and want to access this popup dialog like I do in main window while new modal dialog is opened. If I type to new modal dialog textbox then it pops up again and fills data depending what I type.
I got working that it pops up and fills data, also I can selecting items by pressing arrow and enter keys.
Problem is that I cannot click on item like on the main form, bec开发者_开发技巧ause modal window don't let me do so.
Is there a way to click on item on this popup dialog while another modal dialog is open? Like keep both forms to be active on the same time?
Hope you understand my question.
Regards, evilone
Use EnableWindow function. You can call it in OnShow event handler, ex:
// show Form3 and call modal dialog Form2
procedure TForm1.Button1Click(Sender: TObject);
begin
Form3.Show;
Form2.ShowModal;
end;
// make Form3 controls available while Form2 is modal:
procedure TForm2.FormShow(Sender: TObject);
begin
EnableWindow(Form3.Handle, True);
end;
精彩评论