I am trying to implement Dynamsoft Web Twain in my Angular project. But there is no close button in the installation popup. How to add close button in the popup?
My Angular version is 13.3 Dynamsoft Webtwain version: 17.2.4 Screenshot of popup
I am trying to implement Dynamsoft Web Twain in my Angular project. But there is no close button in the installation popup. How to add close button in the popup?
My Angular version is 13.3 Dynamsoft Webtwain version: 17.2.4 Screenshot of popup
There are three ways to add the close button in
dynamsoft.webtwain.install.js
:Change the value of
closeButton
totrue
in_this.DWT.ShowMessage(ObjString.join(''), { width: promptDlgWidth, headerStyle: 1, closeButton: true });
. By default, it isfalse
.Add a button element based on current code.
For example, add
below
Then add the button click function
above
Now the popup window looks as follows:
You can click the close button to close the dialog. Due to
z-index
, the HTML elements under the popup dialog are not selectable. A tricky way is to modifyz-index
after hiding the popup dialog:Do not call
_this.DWT.ShowMessage(ObjString.join(''), { width: promptDlgWidth, headerStyle: 1, closeButton: true });
. Instead, use jQuery to create a custom dialog. For example: