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

Method removeAction

toolbar.go:478–492  ·  view source on GitHub ↗
(action *Action, visibleChanged bool)

Source from the content-addressed store, hash-verified

476}
477
478func (tb *ToolBar) removeAction(action *Action, visibleChanged bool) error {
479 index := tb.actions.indexInObserver(action)
480
481 if !visibleChanged {
482 action.removeChangedHandler(tb)
483 }
484
485 if 0 == tb.SendMessage(win.TB_DELETEBUTTON, uintptr(index), 0) {
486 return newError("SendMessage(TB_DELETEBUTTON) failed")
487 }
488
489 tb.RequestLayout()
490
491 return nil
492}
493
494func (tb *ToolBar) onInsertedAction(action *Action) error {
495 return tb.insertAction(action, false)

Callers 2

onRemovingActionMethod · 0.95

Calls 5

newErrorFunction · 0.85
indexInObserverMethod · 0.80
removeChangedHandlerMethod · 0.80
SendMessageMethod · 0.65
RequestLayoutMethod · 0.65

Tested by

no test coverage detected