UI/WebView.py
Main Page
Groups
Classes
Examples
UI/WebView.py
1
# Copyright 2012 Autodesk, Inc. All rights reserved.
2
# Use of this software is subject to the terms of the Autodesk license agreement
3
# provided at the time of installation or download, or which otherwise accompanies
4
# this software in either electronic or hard copy form.
5
#
6
# Script description:
7
# Create a tool with a FBWebView showing the Autodesk web page
8
#
9
# Topic: FBWebView
10
#
11
12
from
pyfbsdk
import
*
13
from
pyfbsdk_additions
import
*
14
15
def
CreateTool():
16
# Tool creation will serve as the hub for all other controls
17
t =
FBCreateUniqueTool
(
"WebView Example"
)
18
19
t.StartSizeX = 1024
20
t.StartSizeY = 500
21
22
WebView =
FBWebView
()
23
24
x =
FBAddRegionParam
(0,FBAttachType.kFBAttachLeft,
""
)
25
y =
FBAddRegionParam
(0,FBAttachType.kFBAttachTop,
""
)
26
w =
FBAddRegionParam
(0,FBAttachType.kFBAttachRight,
""
)
27
h =
FBAddRegionParam
(0,FBAttachType.kFBAttachBottom,
""
)
28
29
t.AddRegion(
"WebView"
,
"WebView"
, x, y, w, h)
30
31
t.SetControl(
"WebView"
,WebView)
32
33
ShowTool
(t)
34
35
WebView.Load(
"http://www.autodesk.com"
)
36
37
CreateTool()
38
39