39 lines
807 B
Go
39 lines
807 B
Go
package main
|
|
|
|
import (
|
|
"github.com/ying32/govcl/vcl"
|
|
"github.com/ying32/govcl/vcl/types"
|
|
)
|
|
|
|
const (
|
|
MY_SPACING = 6
|
|
MY_HEIGHT = 90
|
|
MY_WIDTH = 180
|
|
)
|
|
|
|
// vcl_row makes a TPanel row inside the target component.
|
|
func vcl_row(owner vcl.IWinControl, top int32) *vcl.TPanel {
|
|
|
|
r := vcl.NewPanel(owner)
|
|
r.SetParent(owner)
|
|
r.SetBorderStyle(types.BsNone)
|
|
r.SetBevelInner(types.BvNone)
|
|
r.SetBevelOuter(types.BvNone)
|
|
r.SetAlign(types.AlTop)
|
|
r.SetTop(top)
|
|
r.SetAutoSize(true)
|
|
|
|
return r
|
|
}
|
|
|
|
// vcl_menuitem makes a child TMenuItem inside the parent menu.
|
|
func vcl_menuitem(parent *vcl.TMenuItem, caption string, imageIndex int32, onClick vcl.TNotifyEvent) *vcl.TMenuItem {
|
|
m := vcl.NewMenuItem(parent)
|
|
m.SetCaption(caption)
|
|
m.SetImageIndex(imageIndex)
|
|
m.SetOnClick(onClick)
|
|
parent.Add(m)
|
|
|
|
return m
|
|
}
|