private void AddHTML() { Application.Invoke(delegate { if (Spinner.Active) { LayoutVertical.Remove(Spinner); Spinner.Stop(); } else { LayoutVertical.Remove(ScrolledWindow); } ScrolledWindow = new ScrolledWindow() { HscrollbarPolicy = PolicyType.Never }; Viewport viewport = new Viewport(); WebView.Reparent(viewport); ScrolledWindow.Add(viewport); (ScrolledWindow.Child as Viewport).ShadowType = ShadowType.None; LayoutVertical.PackStart(ScrolledWindow, true, true, 0); LayoutVertical.ReorderChild(ScrolledWindow, 0); WebView.LoadString(HTML, null, null, "file://"); LayoutVertical.ShowAll(); }); }
private void AddHTML() { Application.Invoke(delegate { Spinner.Stop(); LogContent.Remove(LogContent.Child); ScrolledWindow = new ScrolledWindow() { HscrollbarPolicy = PolicyType.Never }; Viewport viewport = new Viewport() { ShadowType = ShadowType.None }; WebView.Reparent(viewport); ScrolledWindow.Add(viewport); WebView.LoadString(HTML, null, null, "file://"); LogContent.Add(ScrolledWindow); LogContent.ShowAll(); }); }