WebCanvas

From Xojo Documentation


For desktop applications, see Canvas.

Class (inherits from WebControl)


New in 2012r2

WebCanvas controls are very useful for implementing your own graphical controls because you can use the WebGraphics class to draw inside the WebCanvas region.

Events
Close MouseDown Open
ContextualMenuAction MouseEnter Paint
DoubleClick MouseExit Resized
DropObject MouseMove Shown
Hidden MouseUp


Properties
ContextualMenu Left Page fa-lock-32.png
ControlID fa-lock-32.png LockBottom Parent fa-lock-32.png
Cursor LockHorizontal Style
DragOverStyle LockLeft Top
Enabled LockRight VerticalCenter
Height LockTop Visible
HelpTag LockVertical Width
HorizontalCenter Name fa-lock-32.png Zindex


Methods
AcceptPictureDrop AllowTextDrag PresentContextualMenu
AcceptRawDataDrop Close Refresh
AcceptTextDrop ExecuteJavaScript SetFocus
AllowPictureDrag Invalidate ShowURL
AllowRawDataDrag MsgBox Supported

Notes

Remember: Browsers maintain an uncompressed raster image of the contents of the canvas in memory so it can be displayed to the user. A 1024x1024 pixel canvas requires 4MB of RAM (4 bytes of color data per pixel). A browser may refuse a request to create a canvas that is too large. For instance iOS5 has a memory limit of 10MB for a single web page (it has been increased to 25MB in iOS6). On a Retina display, canvases require 4 times as much memory as a non-retina display.

See Also

WebGraphics, Canvas, Graphics