Hi everyone,
I have problems with adding icons to controls. For some windows I can add icon with no problems, previously choose a icon from a list named as 'Images included in resources file'. When I want to choose a icon for menu item in main window I got window also named as 'Images included in resources file' with completely different items. In that list there is no item which I want to add so I tried to 'Add from File'. Then I got a message 'Cannot add image ".........." Another image with the same base name is already used in the Application.
Best regards,
Zeljko
Problems with adding icons (XIDE)
Re: Problems with adding icons (XIDE)
Hi Zeljko,
The resource files are connected to each app or library separately, so probably this is why you see different image list in different windows (if each window belongs to a different library).
About the problem, maybe it's a bug with image names indeed. You say another base name image is already used in the application, what is the exact name of the already existing image name and the one you are trying to add and fails?
Btw, some weeks ago I also found a related problem with names in resources and fixed it, the fix will be included in X# 3. But I do not know if it's the same problem that you are facing.
The resource files are connected to each app or library separately, so probably this is why you see different image list in different windows (if each window belongs to a different library).
About the problem, maybe it's a bug with image names indeed. You say another base name image is already used in the application, what is the exact name of the already existing image name and the one you are trying to add and fails?
Btw, some weeks ago I also found a related problem with names in resources and fixed it, the fix will be included in X# 3. But I do not know if it's the same problem that you are facing.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Problems with adding icons (XIDE)
Hi Cris,
I want to add the same icon in two different windows. In one window when I choose Properties/Styles/Icon I get one list of icons in 'Select image' window, but when I want to add the same icon in another window I get 'Select image' window with different items and icon I used in previous window is not in the list.
Zeljko
I want to add the same icon in two different windows. In one window when I choose Properties/Styles/Icon I get one list of icons in 'Select image' window, but when I want to add the same icon in another window I get 'Select image' window with different items and icon I used in previous window is not in the list.
Zeljko
Re: Problems with adding icons (XIDE)
Hi Zeljko,
Are the two windows parts of different libraries/applications, or in the same one? As I mentioned previously, different libraries and applications have their own set of files, because images are stored in .resources files, which are embedded to one app/library.
Are the two windows parts of different libraries/applications, or in the same one? As I mentioned previously, different libraries and applications have their own set of files, because images are stored in .resources files, which are embedded to one app/library.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Problems with adding icons (XIDE)
Hi Chris,
here is the situation: I made a winform window and chose a icon for that window. Then, I made a menu item for opening winform window. I wanted to use the same icon for the menu item as for the window. It wasn't possible. Icon wasn't listed. If I wanted to add icon file I got a warning that the icon already exist.
I solved the problem. First I deleted the resource file. Then I created a new one. When I tried to add the same icon I got the same warning. I closed XIDE, opened againg and compile. Then I got two resource files with icon in both of them. I am still confused.
Zeljko
here is the situation: I made a winform window and chose a icon for that window. Then, I made a menu item for opening winform window. I wanted to use the same icon for the menu item as for the window. It wasn't possible. Icon wasn't listed. If I wanted to add icon file I got a warning that the icon already exist.
I solved the problem. First I deleted the resource file. Then I created a new one. When I tried to add the same icon I got the same warning. I closed XIDE, opened againg and compile. Then I got two resource files with icon in both of them. I am still confused.
Zeljko
Re: Problems with adding icons (XIDE)
Hi Zeljko,
I asked you to tell me the exact names of the images, so I can try reproducing the problem here and fix it...
I do see a potential problem though, when you add an image to a control, this does not get added directly to the resource file, so it is not visible in the list the next time you try to use another image. You need to save the form/meny first, then the image gets added to the resource and it is visible in the list.
I asked you to tell me the exact names of the images, so I can try reproducing the problem here and fix it...
I do see a potential problem though, when you add an image to a control, this does not get added directly to the resource file, so it is not visible in the list the next time you try to use another image. You need to save the form/meny first, then the image gets added to the resource and it is visible in the list.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Problems with adding icons (XIDE)
Hi Chris,
names of icon files are group.ico and table.ico.
Zeljko
names of icon files are group.ico and table.ico.
Zeljko
Re: Problems with adding icons (XIDE)
Hi Chris,
not available (visible) icon files in Properties/Styles/Image are visible in Project explorer in <Resources>/<Designers.resources> but have blue icon instead of green icon that have other items (icons).
Zeljko
not available (visible) icon files in Properties/Styles/Image are visible in Project explorer in <Resources>/<Designers.resources> but have blue icon instead of green icon that have other items (icons).
Zeljko
Re: Problems with adding icons (XIDE)
Hi Zeljko,
I think it's better if you can post some screenshots showing what happens, so I can understand the problem better.
I think it's better if you can post some screenshots showing what happens, so I can understand the problem better.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Problems with adding icons (XIDE)
Hi Chris,
I will try to be more precise about problem. I want to add an icon to button. That icon is not listed in Select image window (Properties/Styles/Image)[submitted picture]. If I want to use 'Add from File' I got message 'Cannot add image "....ico". Another image with the same base name is already used in Application'. When I see Project explorer I can see that icon displayed in different color [submitted picture]. It seems that problems occurs when I import a window from another application inside project. In this example I imported window with icons on buttons. In XIDE icons are visible (door_in.ico). When I run application I got error. Then I remove icons from buttons I try to put using 'Add from File' and get error. I am confused.
Zeljko
I will try to be more precise about problem. I want to add an icon to button. That icon is not listed in Select image window (Properties/Styles/Image)[submitted picture]. If I want to use 'Add from File' I got message 'Cannot add image "....ico". Another image with the same base name is already used in Application'. When I see Project explorer I can see that icon displayed in different color [submitted picture]. It seems that problems occurs when I import a window from another application inside project. In this example I imported window with icons on buttons. In XIDE icons are visible (door_in.ico). When I run application I got error. Then I remove icons from buttons I try to put using 'Add from File' and get error. I am confused.
Zeljko

