MCPcopy Create free account
hub / github.com/lxn/walk / setWidgetOnCells

Method setWidgetOnCells

gridlayout.go:185–196  ·  view source on GitHub ↗
(widget Widget, r Rectangle)

Source from the content-addressed store, hash-verified

183}
184
185func (l *GridLayout) setWidgetOnCells(widget Widget, r Rectangle) {
186 var wb *WidgetBase
187 if widget != nil {
188 wb = widget.AsWidgetBase()
189 }
190
191 for row := r.Y; row < r.Y+r.Height; row++ {
192 for col := r.X; col < r.X+r.Width; col++ {
193 l.cells[row][col].widgetBase = wb
194 }
195 }
196}
197
198func (l *GridLayout) Range(widget Widget) (r Rectangle, ok bool) {
199 if widget == nil {

Callers 1

SetRangeMethod · 0.95

Calls 1

AsWidgetBaseMethod · 0.65

Tested by

no test coverage detected