How set icon to toolbar?

Hi im beginer and according to picture i made a toolbar but i cant to set my icon that is in the “D:\plug\hoo.png” i glad to help me :grimacing:

image

UI/Command l#large_icon=-instance_method

UI/Command #small_icon=-instance_method

tanks dezmo but its not work when i write:

h.small_icon = “D:\plug\hoo.png”

turn \ to /

h.small_icon = “D:/plug/hoo.png”
1 Like

image

make error :thinking:

image

h = UI::Toolbar.new "my_tool"
com = UI::Command.new("Open openpanel") { UI.openpanel }
com.small_icon = "D:/plug/hoo.png"
com.large_icon = "D:/plug/hoo.png"
h = h.add_item com
h.show

Please type your code instead of screenshot! :pray:t4:

1 Like

dezmo tank you :heartpulse:

2 Likes