ying32 / govcl Goto Github PK
View Code? Open in Web Editor NEWCross-platform Go/Golang GUI library.
Home Page: https://z-kit.cc
License: Apache License 2.0
Cross-platform Go/Golang GUI library.
Home Page: https://z-kit.cc
License: Apache License 2.0
请问 macOS 怎么把图片打包到资源以及要怎么从资源中加载图片呢? 谢谢
目前几种按钮要么只能支持背景,无法设置文字;要么文字与颜色分开的(左右上下)。需要文字是输入的,背景是通过图片或颜色进行设定的按钮,是否可以支持下,非常感谢!!
有的时候ui程序不一定是 main 包主程序,是否可以让 res2go 增加 -module 参数,用户指定生成的go文件的模块名?
As title said, is it possible to add TChart to this binding ?
f.SetOnMouseWheelDown(func(sender vcl.IObject, shift types.TShiftState, mousePos types.TPoint, handled *bool) {
fmt.Println("mouse wheel down:", mousePos.X, mousePos.Y, *handled, shift)
})
f.SetOnMouseWheelUp(func(sender vcl.IObject, shift types.TShiftState, mousePos types.TPoint, handled *bool) {
fmt.Println("mouse wheel up:", mousePos.X, mousePos.Y, *handled, shift)
})
mouse wheel down: 63 49 false 0
mouse wheel up: 49 52 false 0
好像没有无法获取向上或向下滚动的次数
错误:“NoteDir:TDirectoryEdit”不被支持。
类似于Qt下的QStackedWidget,Flex中的ViewStack。TPageControl可以部分模拟,但效果不太好。虽然只支持vcl,但某些特殊情况下还是比较有用,希望能够支持,多谢!
canvas 不知道如何添加到mainform中
windows系统下,使用框架后,在业务代码中原来有引入C库的代码,会变成链接不通过了。错误提示如下。需要配置什么吗?
c:\go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:\Users\xx\AppData\Local\Temp\go-link-667343987\000000.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
mainForm.SetOnClose(func(sender vcl.IObject, action *types.TCloseAction) { fmt.Println("close main form") CloseApp.Show() mainForm.Hide() })
mainForm.SetOnDestroy(func(sender vcl.IObject) { fmt.Println("destory main form") })
关闭窗口的时候,我确定走了上述两个方法,但是CloseApp窗口还是没有显示出来就服务器停止了
并且此closeApp窗口,我在其他按钮上面测试,是可以正常显示的。
劳烦大佬了!!!
import (
"github.com/ying32/govcl/vcl"
)
var (
mainForm *vcl.TForm
)
func main() {
vcl.Application.Initialize()
mainForm = vcl.Application.CreateForm()
mainForm.SetCaption("Hello")
mainForm.ScreenCenter()
Btn1 := vcl.NewButton(mainForm)
Btn1.SetParent(mainForm)
Btn1.SetBounds(10, 10, 88, 28)
Btn1.SetCaption("Button1")
Btn1.SetOnClick(func(sender vcl.IObject) {
go func() {
vcl.ShowMessage("Hello!")
}()
})
vcl.Application.Run()
}
> fatal error: unexpected signal during runtime execution
> [signal SIGSEGV: segmentation violation code=0x1 addr=0x84 pc=0x7fe1064fdea4]
Hello, in the same way, that we can use SetBounds() for any variable reference that implements IControl, is there a way of calling SetCaption()?
This is my code, at the moment. I am gradually refactoring it to make as much common code as possible...
package main
import (
"github.com/ying32/govcl/vcl"
)
var (
mainForm *vcl.TForm
)
// ControlType is the variable used as an enum
type ControlType int
const (
Label ControlType = 1 + iota
Button
)
type Form struct {
*vcl.TForm
}
func main() {
vcl.Application.Initialize()
mainForm = vcl.Application.CreateForm()
mainForm.SetCaption("Hello to you!!")
mainForm.ScreenCenter()
AddLabel(mainForm, mainForm, 10, 10, 100, 22, "A functional label!")
AddButton(mainForm, mainForm, 10, 40, 40, 20, "Click Me!")
vcl.Application.Run()
}
// AddLabel adds a new Label
func AddLabel(owner vcl.IComponent, parent vcl.IWinControl, left int32, top int32, width int32, height int32, caption string) (*vcl.TLabel) {
label := CreateControl(owner, Label)
label.SetParent(parent)
label.SetBounds(left, top, width, height)
label.SetCaption(caption)
return label
}
// AddButton adds a new button
func AddButton(owner vcl.IComponent, parent vcl.IWinControl, left int32, top int32, width int32, height int32, caption string) (*vcl.TButton) {
button := CreateControl(owner, Button)
button.SetParent(parent)
button.SetBounds(left, top, width, height)
button.SetCaption(caption)
return button
}
// CreateControl is a "Generic" factory method for Control creation
func CreateControl(owner vcl.IComponent, controlType ControlType) (vcl.IWinControl) {
switch controlType {
case Label:
return vcl.NewLabel(owner)
case Button:
return vcl.NewButton(owner)
default:
return nil
}
}
At the moment it is falling down on the calls to SetCaption because there doesn't seem to be an "ancestor" interface that I can use that is common to TLabel and TButton.
Hello again, I've been making further changes to my code. The state of play is that the code works if the AddListBox is commented out but doesn't work if it is included. Any ideas what I am doing wrong?
package main
import (
"github.com/ying32/govcl/vcl"
)
var (
mainForm *vcl.TForm
)
// ControlType is the variable used as an enum
type ControlType int
// This is an enum representing the control type
const (
Label ControlType = 1 + iota
Button
ListBox
)
// Rect represents the bounds of a TControl
type Rect struct {
left, top, width, height int32
}
func main() {
vcl.Application.Initialize()
mainForm = vcl.Application.CreateForm()
mainForm.SetCaption("Hello to you!!")
mainForm.ScreenCenter()
AddLabel(mainForm, Rect{10, 10, 100, 22}, "A functional label!")
AddButton(mainForm, Rect{10, 40, 100, 20}, "Click Me!")
// The code work if the following line is commented out, but not if it is included...
AddListbox(mainForm, Rect{10, 70, 200, 200}, []string{"Alpha", "Beta", "Gamma"})
vcl.Application.Run()
}
// ControlWrapper wraps an IControl
type ControlWrapper struct {
control vcl.IControl
}
// SetProperties combines the SetParent, SetBounds and SetCaption functions
func (wrapper ControlWrapper) SetProperties(parent vcl.IWinControl, rect Rect, caption string) {
wrapper.control.SetParent(parent)
wrapper.control.SetBounds(rect.left, rect.top, rect.width, rect.height)
wrapper.control.SetCaption(caption)
}
// AddLabel adds a new Label
func AddLabel(parent vcl.IWinControl, rect Rect, caption string) *vcl.TLabel {
wrapper := ControlWrapper{CreateControl(parent, Label)}
wrapper.SetProperties(parent, rect, caption)
return wrapper.control.(*vcl.TLabel)
}
// AddButton adds a new button
func AddButton(parent vcl.IWinControl, rect Rect, caption string) *vcl.TButton {
wrapper := ControlWrapper{CreateControl(parent, Button)}
wrapper.SetProperties(parent, rect, caption)
return wrapper.control.(*vcl.TButton)
}
// AddListbox adds a new ListBox
func AddListbox(parent vcl.IWinControl, rect Rect, items []string) *vcl.TListBox {
wrapper := ControlWrapper{CreateControl(parent, ListBox)}
wrapper.SetProperties(parent, rect, "")
for _, item := range items {
wrapper.control.(*vcl.TListBox).Items().Add(item)
}
return wrapper.control.(*vcl.TListBox)
}
// CreateControl is a "Generic" factory method for Control creation
func CreateControl(owner vcl.IComponent, controlType ControlType) vcl.IControl {
switch controlType {
case Label:
return vcl.NewLabel(owner)
case Button:
return vcl.NewButton(owner)
case ListBox:
return vcl.NewListBox(owner)
default:
return nil
}
}
两个问题:
我想添加行到ListBox后自动滚动到最下面,用ScrollBy方法完全不动呀
如题,谢谢
mac os 顶上的菜单怎么解决呢
有几个事件用res2go转换后,入参不对,没有sender,是不是脚本漏掉了?发现的有
PopupMenu的:OnPopupMenuPopup
Edit的:OnEnter、OnEditingDone
能否建个交流群,一起技术交流,也能更好的把项目推广起来
dpi调大后,构件有点小
在keys包中,没有发现对应到键盘的alt,fn键的值
win7 64
TSelectDirectoryDialog 这个没实现
OpenDialog.SetOptions(types.OfAllowMultiSelect) 这个无效
目前lib库的目录是写死的,只能在当前主程序根目录,是否可以让应用自己设置目录?这样程序的目录规划更灵活
MacOS v10.15.1
Go: 1.13.4 darwin/amd64
FPC: 3.0.4
LazarusIDE: 2.0.6
使用 MacOS 64bit编译
代码很简单,一个文本框,一个按钮,一个标签,如下。
type TForm1 struct {
*vcl.TForm
EdtName *vcl.TEdit
BtnSay *vcl.TButton
LbName *vcl.TStaticText
MainMenu1 *vcl.TMainMenu
//::private::
TForm1Fields
}
func (f *TForm1) OnBtnSayClick(sender vcl.IObject) {
f.LbName3.SetCaption(fmt.Sprintf("Hello! %s", f.EdtName.Text()))
}
如果在文本框输入中文,点击两次按钮程序直接崩溃,错误日志如下
LoadLibrary: liblcl.dylib
IsloadedLcl: true
2019-12-11 16:29:09.973 gocode[43323:569442] *** Assertion failure in -[NSTextFieldCell _objectValue:forString:errorDescription:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.10.126/AppKit.subproj/NSCell.m:1417
2019-12-11 16:29:09.976 gocode[43323:569442] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff3395bf53 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff69a21835 objc_exception_throw + 48
2 CoreFoundation 0x00007fff33977810 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff360575d1 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 AppKit 0x00007fff30b3a022 -[NSCell _objectValue:forString:errorDescription:] + 300
5 AppKit 0x00007fff30b39e4d -[NSCell setStringValue:] + 41
6 AppKit 0x00007fff30b8a7c9 -[NSControl setStringValue:] + 210
7 liblcl.dylib 0x0000000007ba7034 ControlScrollBar_StaticClassType + 2201044
8 liblcl.dylib 0x0000000007a3994f ControlScrollBar_StaticClassType + 704239
9 liblcl.dylib 0x0000000007a3fc8f ControlScrollBar_StaticClassType + 729647
10 liblcl.dylib 0x00000000079f450e ControlScrollBar_StaticClassType + 420526
11 liblcl.dylib 0x0000000007a4cb9b ControlScrollBar_StaticClassType + 782651
12 liblcl.dylib 0x000000000791ebf1 liblcl.dylib + 125937
13 gocode 0x0000000004300367 _cgo_1e7a236d0efc_Cfunc_Syscall4 + 39
14 gocode 0x0000000004058600 runtime.asmcgocall + 112
)
libc++abi.dylib: terminating with uncaught exception of type NSException
SIGABRT: abort
PC=0x7fff6aed349a m=0 sigcode=0
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4300340, 0xc000156798, 0x7e9d7b0)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/cgocall.go:128 +0x5b fp=0xc000156768 sp=0xc000156730 pc=0x400488b
github.com/ying32/govcl/vcl/dylib._Cfunc_Syscall4(0x7977478, 0x797c478, 0x2, 0x7e9eff0, 0xc000174030, 0x0)
_cgo_gotypes.go:199 +0x4e fp=0xc000156798 sp=0xc000156768 pc=0x40d2c1e
github.com/ying32/govcl/vcl/dylib.(*LazyProc).CallOriginal.func5(0xc00008e180, 0xc000156908, 0x4, 0x4, 0x3)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:287 +0x18b fp=0xc000156800 sp=0xc000156798 pc=0x40d5d6b
github.com/ying32/govcl/vcl/dylib.(*LazyProc).CallOriginal(0xc00008e180, 0xc000156908, 0x4, 0x4, 0x3, 0x3, 0x4, 0x0)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:287 +0x133 fp=0xc000156878 sp=0xc000156800 pc=0x40d51f3
github.com/ying32/govcl/vcl/dylib.(*LazyDLL).call(0xc0000220c0, 0xc0000c25a0, 0xc000156c88, 0x2, 0x2, 0x20, 0x46791a0, 0x4356b20, 0xc000178000)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:207 +0x1ba fp=0xc000156c30 sp=0xc000156878 pc=0x40d400a
github.com/ying32/govcl/vcl/dylib.(*LazyProc).Call(...)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:267
github.com/ying32/govcl/vcl/api.StaticText_SetCaption(0x7e9eff0, 0xc000174020, 0xb)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/api/importFuncsAuto.go:14894 +0x8d fp=0xc000156ce0 sp=0xc000156c30 pc=0x40fb6ed
github.com/ying32/govcl/vcl.(*TStaticText).SetCaption(...)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/statictext.go:562
main.(*TForm1).OnBtnSayClick(0xc00014b140, 0x4404280, 0xc00016cf40)
/Users/allendang/Desktop/vlctest/gocode/Form1Impl.go:17 +0xcd fp=0xc000156d40 sp=0xc000156ce0 pc=0x42f71dd
runtime.call32(0xc00014b6b0, 0xc000011248, 0xc00016cf20, 0x1800000018)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/asm_amd64.s:539 +0x3b fp=0xc000156d70 sp=0xc000156d40 pc=0x405716b
reflect.callMethod(0xc000022180, 0xc000156e50, 0xc000156e38)
/usr/local/Cellar/go/1.13.4/libexec/src/reflect/value.go:714 +0x1f0 fp=0xc000156e20 sp=0xc000156d70 pc=0x407eda0
reflect.methodValueCall(0x4404280, 0xc00016cf40, 0xc000157438, 0x4331560, 0xc000022180, 0x4035d01, 0x4005a55, 0xc000156ec8, 0x4035f8f, 0xc000024000, ...)
/usr/local/Cellar/go/1.13.4/libexec/src/reflect/asm_amd64.s:35 +0x42 fp=0xc000156e50 sp=0xc000156e20 pc=0x40879d2
github.com/ying32/govcl/vcl.eventCallbackProc(0x98222819, 0x7ffeefbfd950, 0x1, 0xc000157810)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/callbackevent.go:50 +0x3b8 fp=0xc0001577a8 sp=0xc000156e50 pc=0x4293418
github.com/ying32/govcl/vcl.doEventCallbackProc(...)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/callback_posix.go:28
github.com/ying32/govcl/vcl._cgoexpwrap_7521bf8818ec_doEventCallbackProc(0x98222819, 0x7ffeefbfd950, 0x1, 0x0)
_cgo_gotypes.go:86 +0x82 fp=0xc000157810 sp=0xc0001577a8 pc=0x42eb8c2
runtime.call32(0x0, 0x7ffeefbfd7d0, 0x7ffeefbfd860, 0x20)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/asm_amd64.s:539 +0x3b fp=0xc000157840 sp=0xc000157810 pc=0x405716b
runtime.cgocallbackg1(0x0)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/cgocall.go:314 +0x1b7 fp=0xc000157928 sp=0xc000157840 pc=0x4004c37
runtime.cgocallbackg(0x0)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/cgocall.go:191 +0xc1 fp=0xc000157990 sp=0xc000157928 pc=0x40049e1
runtime.cgocallback_gofunc(0x40048af, 0x4300300, 0xc000157a20, 0xc000157a10)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/asm_amd64.s:793 +0x9b fp=0xc0001579b0 sp=0xc000157990 pc=0x405873b
runtime.asmcgocall(0x4300300, 0xc000157a20)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/asm_amd64.s:640 +0x42 fp=0xc0001579b8 sp=0xc0001579b0 pc=0x40585d2
runtime.cgocall(0x4300300, 0xc000157a20, 0xc000157ae0)
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/cgocall.go:131 +0x7f fp=0xc0001579f0 sp=0xc0001579b8 pc=0x40048af
github.com/ying32/govcl/vcl/dylib._Cfunc_Syscall3(0x7977478, 0x79774a8, 0x1, 0x7e988f0, 0x0)
_cgo_gotypes.go:183 +0x4e fp=0xc000157a20 sp=0xc0001579f0 pc=0x40d2b2e
github.com/ying32/govcl/vcl/dylib.(*LazyProc).CallOriginal.func4(0xc00008e180, 0xc000157b68, 0x3, 0x3, 0x8)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:285 +0x143 fp=0xc000157a78 sp=0xc000157a20 pc=0x40d5ba3
github.com/ying32/govcl/vcl/dylib.(*LazyProc).CallOriginal(0xc00008e180, 0xc000157b68, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:285 +0x197 fp=0xc000157af0 sp=0xc000157a78 pc=0x40d5257
github.com/ying32/govcl/vcl/dylib.(*LazyDLL).call(0xc0000220c0, 0xc00014a270, 0xc000157ef0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:205 +0x100 fp=0xc000157ea8 sp=0xc000157af0 pc=0x40d3f50
github.com/ying32/govcl/vcl/dylib.(*LazyProc).Call(...)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/dylib/dylib_posix.go:267
github.com/ying32/govcl/vcl/api.Application_Run(0x7e988f0)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/api/applicationdef.go:14 +0x65 fp=0xc000157f08 sp=0xc000157ea8 pc=0x40d7ea5
github.com/ying32/govcl/vcl.(*TApplication).Run(...)
/Users/allendang/Documents/Gocode/src/github.com/ying32/govcl/vcl/applicationdef.go:86
main.main()
/Users/allendang/Desktop/vlctest/gocode/main.go:12 +0xd8 fp=0xc000157f60 sp=0xc000157f08 pc=0x42f72d8
runtime.main()
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/proc.go:203 +0x21e fp=0xc000157fe0 sp=0xc000157f60 pc=0x402ec0e
runtime.goexit()
/usr/local/Cellar/go/1.13.4/libexec/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc000157fe8 sp=0xc000157fe0 pc=0x4058e61
rax 0x0
rbx 0xc676dc0
rcx 0x7ffeefbfb8b8
rdx 0x0
rdi 0x307
rsi 0x6
rbp 0x7ffeefbfb8e0
rsp 0x7ffeefbfb8b8
r8 0x7ffeefbfb780
r9 0x7ffeefbfb950
r10 0x0
r11 0x246
r12 0x307
r13 0x3000000008
r14 0x6
r15 0x16
rip 0x7fff6aed349a
rflags 0x246
cs 0x7
fs 0x0
gs 0x0
WARNING: TButton.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
Hello,
no problem here, I'm just curious to know why you don't focus only on supporting LCL, which is free and cross-platform and still keep supporting VCL which is not cross-platform and mostly not really free (except for open source development if I understand well).
so you have to be compatible with both of them and restrict the functions to what is common between them...
is VCL really better or does it have some specials possibilities that could justify to keep supporting it ?
please just consider my question as the expression of my curiosity, I do not want to blame you for anything. you have made a really great work with govcl, thanks for that !!
Thanks for the great job.
res2go displays a message: Warning: "DlgSelectFolder:TSelectDirectoryDialog" is not supported and it may fail to create.
Possible to add TSelectDirectoryDialogto this binding?
https://github.com/Masterminds/glide
解决包路径和实际下载路径不一致等问题等
vcl.StyleManager.SetStyle 对同一个主题资源
窗体在设计好内容后,还是可以随便拖拉边框,显示一些框外区域。测试过SetScaled, SetEnabled, SetAutoSize, SetDockSite等,都不管用。
不确定是我使用方法不正确还是暂时没有支持,劳烦指点下。感谢感谢!!!
调用TStringList的AddObject方法插入对象后,再调用Objects方法获取刚才插入的对象,返回值为空,测试代码:
package main
import (
"gitee.com/ying32/govcl/vcl"
"unsafe"
)
type Person struct {
Name string
}
func main() {
p1 := &Person{}
p1.Name = "Tom"
strList := vcl.NewStringList()
strList.AddObject("item1", vcl.ObjectFromInst(uintptr(unsafe.Pointer(&p1))))
item1 := (* Person)(unsafe.Pointer(strList.Objects(0)))
println("Name = " + item1.Name)
}
Hello, As someone with 20 year's experience of Delphi (and more recently Free Pascal/Lazarus) and also a Golang user for the last year, I am naturally very interested in this project.
However, I am having difficulties following the exact steps needed to run it on macOS. Could you set out some step by step instructions that would guarantee that I would be able to build and install this package?
I realise and appreciate that English is not your native language, but at the moment there are too many missing gaps in the instructions, which leaves too much to guesswork.
If you can do this for me, I will definitely do all I can to promote it!
Thanks in advance,
Carl
另外,目前好像没法设置AnchorSide,边界不好定锚点,好像也不好实现动态改变控件大小的效果。这些都有办法绕过去吗?多谢
Hello!
It would be great if you implemented the component TMPlayerControl (with Linux & Windows support)
http://wiki.lazarus.freepascal.org/TMPlayerControl
https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/mplayer/
github.com/ying32/govcl/pkgs/winappres(.rsrc): too many .rsrc sections
如何优雅地解决这个问题?
肯定管理员权限的,肯定不去动注册表之类的。
GoVCL looks like it is exactly what I was looking for if I can get it to work with Res2Go. I only get this error when using Res2Go to create the forms, otherwise the DLL is found with no problem. If I create a go project without using Res2Go, the DLL is loaded. If I put the liblcl.dll in your formEvents example project (where forms were created using your GOVCL UI designer) and run it, it works fine. But if I run Res2Go myself and put the DLL with the generated files, I get that error.
Any ideas? :-)
bf := []byte{1,2,3}
strm := vcl.NewMemoryStreamFromBytes(bf)
fmt.Println(strm.Read(3))
strm.Seek(0, 0)
fmt.Println(strm.Read(3))
输出
[0,0,0]
[1,2,3]
If I have correctly understood The provided little example in readme, yours GUI toolkit do not require pixel values as mandatory argument when user want to create application GUI.
This would be A ideal solution for visually impaired Pascal programmer. The good question is, if this toolkit can be also used when somebody would want to develop for Android? If not, would be possible to develop Windows apps with yours project?
Thank you very much for yours explanation.
I do not see at all, so modern form designers are not usable for Me. And pixel values, which are often being generated by various IDES according to object mouse positions when sighted developer design it are not usable for Me. Since I can not specify good Pixel values because I do not see.
Hi,
first, thanks for your work. just discovered it and looks great !
now, in the readme of "style" sample there's a link to download style files, but it's on a Chinese website witch - I think - ask me to register.
can't you put the files on the same place as the vcl & lcl libraries so we can directly have access ?
thanks
win7 64
mainForm.SetWindowState(types.WsFullScreen)
vcl64 Normal 没反应
lcl Maximized 最大化
环境是win10 64位,测试代码如下:
package main
import (
"github.com/ying32/govcl/vcl"
)
var fm_main *vcl.TForm
var dlg *vcl.TForm
func main() {
vcl.Application.Initialize()
fm_main = vcl.Application.CreateForm()
fm_main.EnabledMaximize(false)
fm_main.ScreenCenter()
btn_open_dlg := vcl.NewButton(fm_main)
btn_open_dlg.SetParent(fm_main)
btn_open_dlg.SetCaption("open dlg")
btn_open_dlg.SetOnClick(func(sender vcl.IObject) {
go func() { // 放到独立线程里,关掉dlg就会卡死, 去掉 go func() 直接执行就ok
dlg.Show() // 或者改成 dlg.ShowModal()
}()
})
dlg = vcl.NewForm(fm_main)
btn_dlg := vcl.NewButton(dlg)
btn_dlg.SetParent(dlg)
btn_dlg.SetCaption("Close Dialog")
btn_dlg.SetOnClick(func(sender vcl.IObject) {
dlg.Close()
})
vcl.Application.Run()
}
dlg.Show()
会让dlg卡死, dlg.ShowModal()
关掉dlg后会让主窗体卡死。。
目前多个label右对齐非常不方便,不知道是否可以支持
无法打开二级目录
Win:
rtl.SysOpen("F:\") 可以打开
rtl.SysOpen("F:\filename\") 不可以打开
Hi @ying32, thanks for this awesome library.
I've been looking for simple GUI library for Golang, and I think this library matches my requirement. However, I noticed that you use LGPL-2 as the license for this library.
As far as I know, LGPL license insists that end user must be able to recombine or relink the application with a modified or different version of the LGPL library. However, Golang as today only support static linking the library.
That means, if I use this library for my Golang project, I can't create a closed source application, because according to LGPL the end user must be able to swap the LGPL library with other version that he wants. And since Golang still not supporting dynamic linking, my only choice is to give the end user my source code, so he can compile it with his own library.
You can see more details about implication of using LGPL license in Golang project here.
So, is it possible for you to change the LGPL license to more permissive license ? Maybe for example you can use MIT License, Apache 2.0 or BSD 3.0. I personally recommended Apache 2.0 which allows the programmer to use your library however he/she want, as long as he/she gives proper attribution to you as the creator of this library.
Thank you.
可以在此issue下提出你想增加的例程需求,我会根据所提出的例程视情况采纳。
1、不要太过于复杂的需求。
2、不要超出govcl范围。
3、不要提一些不可能实现的需求。
窗口操作系统级的置顶 ontop 功能, 好像 SetTop 等不是控制这个的, stay on top 等我之前找 go gui 框架都关注这个好像也不太容易.
其实在 QQ 群里得到群主答复了, 非常感谢, issue 里感觉可能方便更多人搜到, 遇到问题先尝试搜索是一种好习惯
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.