user3763845
user3763845

Reputation: 95

Awesomium change file field

I am trying to make own DialogBox for choosing the file. But it doesn't work for me.

I am catching the event:

webView.SelectLocalFiles += OnSelectLocalFiles;

private void OnSelectLocalFiles(object sender, FileDialogEventArgs e)
{
    ...
    e.SelectedFile = "D:\\a.txt";
}

Where did I make mistake?

In example, Dialog Box is calling two times.

  1. Pressed choose the file.
  2. Chose the file from dialog box.
  3. Pressed OK.
  4. File didn't select.
  5. New dialog box showed immediately.
  6. Chose the file again.
  7. Pressed OK.
  8. File was chosen.

Upvotes: 0

Views: 227

Answers (1)

user3763845
user3763845

Reputation: 95

The solution is to set e.Handled = EventHandling.Modal.

Upvotes: 1

Related Questions