MCPcopy Index your code
hub / github.com/lxn/walk / SetAlignment

Method SetAlignment

tableviewcolumn.go:48–67  ·  view source on GitHub ↗

SetAlignment sets the alignment of the TableViewColumn.

(alignment Alignment1D)

Source from the content-addressed store, hash-verified

46
47// SetAlignment sets the alignment of the TableViewColumn.
48func (tvc *TableViewColumn) SetAlignment(alignment Alignment1D) (err error) {
49 if alignment == AlignDefault {
50 alignment = AlignNear
51 }
52
53 if alignment == tvc.alignment {
54 return nil
55 }
56
57 old := tvc.alignment
58 defer func() {
59 if err != nil {
60 tvc.alignment = old
61 }
62 }()
63
64 tvc.alignment = alignment
65
66 return tvc.update()
67}
68
69// DataMember returns the data member this TableViewColumn is bound against.
70func (tvc *TableViewColumn) DataMember() string {

Callers 1

CreateMethod · 0.95

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected