Toolbar icon not appear

I made 24 x 24 px png , and put the path as following:
runCode_cmd.small_icon = “C:\Users\user1\RubymineProjects\2016test\testproject\images\Run_plugin_24.png”

but still not appear .

shall the images be in specific folder

Hi,

No it hasn’t to be in a specific folder.

  1. Are you sure that your image path is valid ?
  2. Do you have a default image () loaded into your toolbar or just nothing ?
  3. Can you give us a bit more of your command code ?

yes I have default image loaded into my toolbar

Replace the '' characters by ‘/’ ones in your path, SU is sensible to that :wink:

1 Like

or let ruby create the path

image_path = File.join(__dir__, "images", "Run_plugin_24.png")
runCode_cmd.small_icon = image_path

john

thanks .it worked fine . problem in the slash direction

1 Like

Ah yes! In a string in Ruby, a single backslash is the escape character. To get a literal backslash you have to double it. In the end it’s easier to use forward slashes (and its more portable, as only Windows uses backslash for paths!).

1 Like