func_maxgui_html views_createhtmlview.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .. _func_maxgui_html views_createhtmlview:
  2. ==============
  3. CreateHTMLView
  4. ==============
  5. CreateHTMLView -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. CreateHTMLView:TGadget(x,y,w,h,group:TGadget,style=0)
  10. Create an HTMLView gadget.
  11. The HTMLView is a complete web browser object inside a MaxGUI gadget. The HTML
  12. page displayed is controlled with the #HTMLViewGo command or from the user navigating
  13. from within the currently viewed page.
  14. #CreateHTMLView supports the following styles:
  15. [ @Style | @Meaning
  16. * HTMLVIEW_NOCONTEXTMENU | The webpage's default context menu is disabled.
  17. * HTMLVIEW_NONAVIGATE | User navigation is disabled and EVENT_GADGETACTION is generated instead.
  18. ]
  19. [ @{Event ID} | @Description
  20. * EVENT_GADGETDONE | Generated when a webpage has finished loading.
  21. * EVENT_GADGETACTION | Generated when a user clicks a link. Event Text contains the requested URL.
  22. ]
  23. %{Note: EVENT_GADGETACTION requires the HTMLVIEW_NONAVIGATE style flag.}
  24. See Also: #HtmlViewGo, #HtmlViewBack, #HtmlViewForward, #HtmlViewStatus and #HtmlViewCurrentURL.
  25. Parameters
  26. ==========
  27. Return Values
  28. =============
  29. Nothing.
  30. Examples
  31. ========
  32. .. code-block:: blitzmax
  33. ' createhtmlview.bmx
  34. Import MaxGui.Drivers
  35. Strict
  36. Local window:TGadget
  37. Local htmlview:TGadget
  38. window=CreateWindow("My Window",30,20,600,440,,15|WINDOW_ACCEPTFILES)
  39. htmlview=CreateHTMLView(0,0,ClientWidth(window),ClientHeight(window),window)
  40. SetGadgetLayout htmlview,1,1,1,1
  41. HtmlViewGo htmlview,"www.blitzmax.com"
  42. While WaitEvent()
  43. Print CurrentEvent.ToString()
  44. Select EventID()
  45. Case EVENT_WINDOWCLOSE
  46. End
  47. End Select
  48. Wend
  49. See Also
  50. ========