MCPcopy
hub / github.com/g3n/engine / setHorizontalScrollbarVisible

Method setHorizontalScrollbarVisible

gui/scroller.go:333–341  ·  view source on GitHub ↗

setVerticalScrollbarVisible sets the horizontal scrollbar visible, creating and initializing it if it's the first time

()

Source from the content-addressed store, hash-verified

331
332// setVerticalScrollbarVisible sets the horizontal scrollbar visible, creating and initializing it if it's the first time
333func (s *Scroller) setHorizontalScrollbarVisible() {
334 if s.hscroll == nil {
335 s.hscroll = NewHScrollBar(0, s.style.HorizontalScrollbar.Broadness)
336 s.hscroll.applyStyle(&s.style.HorizontalScrollbar.ScrollBarStyle)
337 s.hscroll.Subscribe(OnChange, s.onScrollBarEvent)
338 s.Add(s.hscroll)
339 }
340 s.hscroll.SetVisible(true)
341}
342
343// updateScrollbarsVisibility updates the visibility of the scrollbars and corner panel, creating them if necessary.
344// This method should be called when either the target panel changes size or when either the scroll mode or

Callers 1

Calls 5

NewHScrollBarFunction · 0.85
SubscribeMethod · 0.65
SetVisibleMethod · 0.65
applyStyleMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected