|
|
Home » Community » Newbie corner » How to create and add several icons to an application
How to create and add several icons to an application [message #27043] |
Tue, 22 June 2010 20:35  |
281264
Messages: 272 Registered: June 2010 Location: Spain
|
Experienced Member |
|
|
Hi,
I am finding some difficulties when working with the image designer and when adding icons to an application.
For instance, after creating (from scratch) a new GUI application with images a new iml file is added to my application. Well, so far so good. But when a double click on it and the image designer opens I can not create anything (it is a pity for the tool looks good).
So,
1.- How can I add several icons to an application?
2,. How can I create an icon?
3.- The example in the tutorial (attached herewith) is so telegraphic that it is hard to understand how this feature works. For example:
3.1.- the code #define IMAGECLASS TutorialImg, What is it doing?
3.2.- I reckon that ALL the images I intend to use in an application can be stored in a single file .iml???
I would appreciate if someone can shed light on this topic. Many thanks.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define IMAGECLASS TutorialImg
#define IMAGEFILE <Tutorial/images.iml>
#include <Draw/iml.h>
struct MyAppWindow : TopWindow {
MenuBar menu;
void Exit() {
if(PromptOKCancel("Exit MyApp?"))
Break();
}
void SubMenu(Bar& bar) {
bar.Add("Exit", TutorialImg::Exit(), THISBACK(Exit));
}
void MainMenu(Bar& bar) {
bar.Add("Menu", THISBACK(SubMenu));
}
typedef MyAppWindow CLASSNAME;
MyAppWindow() {
Title("My application with menu and images").Sizeable();
AddFrame(menu);
menu.Set(THISBACK(MainMenu));
}
};
GUI_APP_MAIN
{
MyAppWindow app;
app.Run();
}
|
|
|
Re: How to create and add several icons to an application [message #27046 is a reply to message #27043] |
Tue, 22 June 2010 23:17   |
 |
forlano
Messages: 1207 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
281264 wrote on Tue, 22 June 2010 20:35 |
1.- How can I add several icons to an application?
2,. How can I create an icon?
3.- The example in the tutorial (attached herewith) is so telegraphic that it is hard to understand how this feature works. For example:
3.1.- the code #define IMAGECLASS TutorialImg, What is it doing?
3.2.- I reckon that ALL the images I intend to use in an application can be stored in a single file .iml???
I would appreciate if someone can shed light on this topic. Many thanks.
|
Hello,
first of all, have you tried to add to your package a file with extension .iml? When you create it will appear the icon designer and everything should be much clear.
I suspect you have not yet added a iml file. The previous example is missing the iml file where the icons are.
A better example is the package "iml" in the assembly reference.
Luigi
[Updated on: Tue, 22 June 2010 23:22] Report message to a moderator
|
|
|
|
Re: How to create and add several icons to an application [message #27048 is a reply to message #27047] |
Wed, 23 June 2010 04:38   |
Sc0rch
Messages: 99 Registered: February 2008 Location: Russia, Rubtsovsk
|
Member |

|
|
281264 wrote on Wed, 23 June 2010 04:55 | Thanks but I already added an .iml file so the point is not related with having the image designer running but how to work with it.
When I have it opened I do not know how to start designing an image. Even if I select to paint a rectangle nothing happens.
So, how to start painting things once you have the image designer already opened?.
|
Sorry for my English. Did you add a new image in list or not? (by right click, new image, you must type the name and size of image) after adding grid appears at the right side of IML-designer.
281264 wrote on Wed, 23 June 2010 04:55 |
I have added some already existing .iml files to my application (those contained with U++) and found that many icons are associated with each .iml file. So, can a single .iml file contain several images?
|
Yes. You can draw images, insert them from clipboard or other files. New images can be added to IML-designer by right click at the list of images.
Goodluck! If you still have problem, send the screenshot and write the algoritm of your actions.
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 19:39:45 CEST 2025
Total time taken to generate the page: 0.00368 seconds
|
|
|