SetImageFromFile sets the image label image from the specified filename If there is currently a selected icon, it is removed
(imgfile string)
| 118 | // SetImageFromFile sets the image label image from the specified filename |
| 119 | // If there is currently a selected icon, it is removed |
| 120 | func (il *ImageLabel) SetImageFromFile(imgfile string) error { |
| 121 | |
| 122 | img, err := NewImage(imgfile) |
| 123 | if err != nil { |
| 124 | return err |
| 125 | } |
| 126 | il.SetImage(img) |
| 127 | return nil |
| 128 | } |
| 129 | |
| 130 | // SetColor sets the color of the label and icon text |
| 131 | func (il *ImageLabel) SetColor(color *math32.Color) { |
no test coverage detected