FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour WebView on a non-modal window
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
WebView on a non-modal window
Posted: 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()
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: WebView on a non-modal window
Posted: 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
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: WebView on a non-modal window
Posted: Mon Dec 12, 2022 11:32 AM

Thank you, Antonio! And what is the webview:Run() method for ?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: WebView on a non-modal window
Posted: 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

Continue the discussion