MCPcopy Create free account
hub / github.com/Macmod/godap / AddCheckbox

Method AddCheckbox

tui/theme.go:199–212  ·  view source on GitHub ↗
(label string, checked bool, changed func(checked bool))

Source from the content-addressed store, hash-verified

197}
198
199func (f *XForm) AddCheckbox(label string, checked bool, changed func(checked bool)) *XForm {
200 f.AddFormItem(
201 tview.NewCheckbox().
202 //SetCheckedStyle(tcell.StyleDefault.Background(tcell.ColorGreen).Foreground(tcell.ColorWhite)).
203 //SetUncheckedStyle(tcell.StyleDefault.Background(tcell.ColorRed).Foreground(tcell.ColorWhite)).
204 SetCheckedString("True").
205 SetUncheckedString("False").
206 SetLabel(label).
207 SetChecked(checked).
208 SetChangedFunc(changed),
209 )
210
211 return f
212}
213
214func GetEntryColor(entry *ldap.Entry) (tcell.Color, bool) {
215 isDeleted := strings.ToLower(entry.GetAttributeValue("isDeleted")) == "true"

Callers 7

getNormalPermsFormFunction · 0.95
openUpdateUacFormFunction · 0.95
loadAceEditorFormFunction · 0.80
handleAttrsKeyCtrlEFunction · 0.80
handleAttrsKeyCtrlNFunction · 0.80
openConfigFormFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected