mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 15:42:53 +08:00

* fix: fix go test errors * Add flags to mac test * Run on all branches * Update PR workflow Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
32 lines
605 B
Go
32 lines
605 B
Go
//go:build windows
|
|
|
|
/*
|
|
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
|
*/
|
|
|
|
package winc
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
|
|
)
|
|
|
|
type Label struct {
|
|
ControlBase
|
|
}
|
|
|
|
func NewLabel(parent Controller) *Label {
|
|
lb := new(Label)
|
|
|
|
lb.InitControl("STATIC", parent, 0, w32.WS_CHILD|w32.WS_VISIBLE|w32.SS_LEFTNOWORDWRAP)
|
|
RegMsgHandler(lb)
|
|
|
|
lb.SetFont(DefaultFont)
|
|
lb.SetText("Label")
|
|
lb.SetSize(100, 25)
|
|
return lb
|
|
}
|
|
|
|
func (lb *Label) WndProc(msg uint32, wparam, lparam uintptr) uintptr {
|
|
return w32.DefWindowProc(lb.hwnd, msg, wparam, lparam)
|
|
}
|