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 HorizontalCenter Style
ControlID fa-lock-32.png Left Top
Cursor LockBottom VerticalCenter
DisableDiffEngine LockHorizontal Visible
DragOverStyle LockLeft Width
Enabled LockRight Zindex
Height LockTop
HelpTag LockVertical
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, Graphics classes; UserGuide:Web Canvas topic