Closed torkus closed 8 months ago
I'm trying to set an attribute on a widget using a tk.WidgetAttr but the key and value fields are not exported: https://github.com/visualfc/atk/blob/069a392c3bd61497b4954b5aec98470627d4e49e/tk/widget_attr.go#L10-L13
tk.WidgetAttr
key
value
Outside of the tk package, how is one supposed to create and use these widgets?
tk
This:
disabled := tk.WidgetAttr{"state", "disabled"}
gets this:
implicit assignment to unexported field key in struct literal of type tk.WidgetAttr
and this:
disabled := tk.WidgetAttr{key: "state", value: "disabled"}
unknown field key in struct literal of type tk.WidgetAttr
PR here: https://github.com/visualfc/atk/pull/35
I'm trying to set an attribute on a widget using a
tk.WidgetAttr
but thekey
andvalue
fields are not exported: https://github.com/visualfc/atk/blob/069a392c3bd61497b4954b5aec98470627d4e49e/tk/widget_attr.go#L10-L13Outside of the
tk
package, how is one supposed to create and use these widgets?This:
gets this:
and this:
gets this: