SetLeadingIcon sets the [TextField.LeadingIcon] to the given icon. If an on click function is specified, it also sets the [TextField.LeadingIconOnClick] to that function. If no function is specified, it does not override any already set function.
(icon icons.Icon, onClick ...func(e events.Event))
| 466 | // to that function. If no function is specified, it does not override any already |
| 467 | // set function. |
| 468 | func (tf *TextField) SetLeadingIcon(icon icons.Icon, onClick ...func(e events.Event)) *TextField { |
| 469 | tf.LeadingIcon = icon |
| 470 | if len(onClick) > 0 { |
| 471 | tf.LeadingIconOnClick = onClick[0] |
| 472 | } |
| 473 | return tf |
| 474 | } |
| 475 | |
| 476 | // SetTrailingIcon sets the [TextField.TrailingIcon] to the given icon. If an |
| 477 | // on click function is specified, it also sets the [TextField.TrailingIconOnClick] |
no outgoing calls