提交 2446bf1d 编写于 作者: yanghye's avatar yanghye

demo update

上级 c5bfafdd
......@@ -243,6 +243,8 @@ func (m *BrowserEvent) SetOnZoomPctAvailable(event ChromiumEventOnResultFloat) {
}
// BrowserEvent.SetOnLoadStart
//
// 开始加载事件
func (m *BrowserEvent) SetOnLoadStart(event ChromiumEventOnLoadStart) {
if Args.IsMain() {
m.chromium.SetOnLoadStart(event)
......@@ -250,6 +252,8 @@ func (m *BrowserEvent) SetOnLoadStart(event ChromiumEventOnLoadStart) {
}
// BrowserEvent.SetOnLoadingStateChange
//
// 页面加载状态事件
func (m *BrowserEvent) SetOnLoadingStateChange(event ChromiumEventOnLoadingStateChange) {
if Args.IsMain() {
m.onLoadingStateChange = event
......@@ -257,6 +261,8 @@ func (m *BrowserEvent) SetOnLoadingStateChange(event ChromiumEventOnLoadingState
}
// BrowserEvent.SetOnLoadingProgressChange
//
// 页面加载进度改变事件
func (m *BrowserEvent) SetOnLoadingProgressChange(event ChromiumEventOnLoadingProgressChange) {
if Args.IsMain() {
m.chromium.SetOnLoadingProgressChange(event)
......
可将html css javascript image等静态资源放入该目录,编译后将内置到执行程序中
\ No newline at end of file
可将html css javascript image等静态资源放入该目录,编译后将内置到执行程序中
通过内置http server 读取该目录文件,展示到页面中
\ No newline at end of file
......@@ -90,7 +90,7 @@ func controlUI(browserWindow *cef.TCefWindowInfo) (goBack *lcl.TButton, goForwar
//创建下拉框
addrBox = lcl.NewComboBox(addrPanel)
addrBox.SetParent(addrPanel)
addrBox.SetLeft(35 + 35 + 35 + 35) //这里是设置左边距 上面三个按钮的宽度
addrBox.SetLeft(35 + 35 + 35 + 35) //这里是设置左边距 上面按钮的宽度
addrBox.SetWidth(window.Width() - (35 + 35 + 35 + 35 + 35 + 35)) //宽度 减按钮的宽度
addrBox.SetAnchors(types.NewSet(types.AkLeft, types.AkTop, types.AkRight)) //设置锚点定位,让宽高自动根据窗口调整大小
addrBox.Items().Add("https://energy.yanghy.cn")
......
可将html css javascript image等静态资源放入该目录,编译后将内置到执行程序中
\ No newline at end of file
可将html css javascript image等静态资源放入该目录,编译后将内置到执行程序中
通过内置http server 读取该目录文件,展示到页面中
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册