WebView on a non-modal window

WebView on a non-modal window

Postby Natter » Mon Dec 12, 2022 10:39 am

At the beginning of my program, I open a modeless POPUP window. Then I create a WebView object and put it in this non-modal dialog. However, further work of the program is not performed because WebView is still a modal window :(

DEFINE DIALOG oKds FROM 0,0 TO 0,0 PIXEL ;
STYLE nOR(WS_POPUP) COLOR CLR_BLACK, CLR_WHITE
ACTIVATE DIALOG oDlg NOWAIT

oWebView := TWebView():New()

oWebView:SetParent(oDlg)
oWebView:Run()
oWebView:Destroy()
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Re: WebView on a non-modal window

Postby Antonio Linares » Mon Dec 12, 2022 11:22 am

Dear Natter,

Please don't call oWebView:Run() as it uses a modal loop, neither oWebView:Destroy() or you will destroy it.

At the end of the app, you destroy it, or when the popup window is closed
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: WebView on a non-modal window

Postby Natter » Mon Dec 12, 2022 11:32 am

Thank you, Antonio! And what is the webview:Run() method for ?
Natter
 
Posts: 1215
Joined: Mon May 14, 2007 9:49 am

Re: WebView on a non-modal window

Postby Antonio Linares » Mon Dec 12, 2022 11:35 am

It is just an event loop handler, not needed as FWH uses its own
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests

cron