FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/cefpython/cef1/wx-subpackage/examples/sample1.py at cefpython31 · 2php/cefpython · GitHub
2php
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
cefpython
/
cef1
/
wx-subpackage
/
examples
/
sample1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (27 loc) · 1.01 KB
Breadcrumbs
cefpython
/
cefpython
/
cef1
/
wx-subpackage
/
examples
/
sample1.py
Copy path
File metadata and controls
34 lines (27 loc) · 1.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Simple sample ilustrating the usage of CEFWindow class
# __author__ = "Greg Kacy <grkacy@gmail.com>"
import
os
import
wx
import
cefpython1
.
wx
.
chromectrl
as
chrome
class
MainFrame
(
wx
.
Frame
):
def
__init__
(
self
):
wx
.
Frame
.
__init__
(
self
,
parent
=
None
,
id
=
wx
.
ID_ANY
,
title
=
'cefwx example1'
,
size
=
(
600
,
400
))
self
.
cefWindow
=
chrome
.
ChromeWindow
(
self
,
url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"sample1.html"
))
sizer
=
wx
.
BoxSizer
()
sizer
.
Add
(
self
.
cefWindow
,
1
,
wx
.
EXPAND
,
0
)
self
.
SetSizer
(
sizer
)
self
.
Bind
(
wx
.
EVT_CLOSE
,
self
.
OnClose
)
def
OnClose
(
self
,
event
):
self
.
Destroy
()
if
__name__
==
'__main__'
:
chrome
.
Initialize
()
print
(
'sample1.py: wx.version=%s'
%
wx
.
version
())
app
=
wx
.
PySimpleApp
()
MainFrame
().
Show
()
app
.
MainLoop
()
# Important: do the wx cleanup before calling Shutdown.
del
app
chrome
.
Shutdown
()
Back
|
FazBrowse Home
|
New Git URL