hier eine kleine Demo zur Inspiration. Wer Lust hat kann das ja mal ausbauen und hier posten.
z.B. Daten ändern
Code: Alles auswählen
; PB 5.60 x64 unter Windows 10
; damit Webgadget den Htmlcode richtig anzeigt, habe ich gelesen im Forum und funktioniert
; <meta http-equiv='X-UA-Compatible' content='IE=edge'>
; Original Html siehe Google
; https://google-developers.appspot.com/chart/interactive/docs/quick_start
Html$ = "<html>" +
"<head>" +
"<meta http-equiv='X-UA-Compatible' content='IE=edge'>" +
"<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>" +
"<script type='text/javascript'>" +
"google.charts.load('current', {'packages':['corechart']});" +
"google.charts.setOnLoadCallback(drawChart);" +
"function drawChart() {" +
"var Data = new google.visualization.DataTable();" +
"Data.addColumn('string', 'Topping');" +
"Data.addColumn('number', 'Slices');" +
"Data.addRows([" +
"['Birnen', 4]," +
"['Onions', 1]," +
"['Olives', 1]," +
"['Zucchini', 1]," +
"['Pepperoni', 2]" +
"]);" +
"var options = {'title':'How Much Pizza I Ate Last Night'," +
"'width':400," +
"'height':300};" +
"var chart = new google.visualization.PieChart(document.getElementById('chart_div'));" +
"chart.draw(Data, options);" +
"}" +
"</script>" +
"</head>" +
"<body>" +
"<div id='chart_div'></div>" +
"</body>" +
"</html>"
If OpenWindow(0, 0, 0, 800, 500, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;oder aus Datei
;WebGadget(0, 10, 10, 800, 500, "file://C:\Users\hjbremer\Dropbox\BeispieleV4\test.html")
ContainerGadget(11, 10, 10, 425, 325, #PB_Container_Double) ;25 größer als im HtmlCode oben
WebGadget(0, 0, 0, 425, 325, "") ;sonst Scrollbalken
SetGadgetItemText(0, #PB_Web_HtmlCode, html$)
CloseGadgetList()
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf