Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
281264 is currently offline  281264
Messages: 270
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 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
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 #27047 is a reply to message #27046] Tue, 22 June 2010 23:55 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
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?.

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?

Thanks.
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 Go to previous messageGo to next message
Sc0rch is currently offline  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.
Re: How to create and add several icons to an application [message #27049 is a reply to message #27043] Wed, 23 June 2010 13:52 Go to previous message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
I made it!.

Thanks a lot.

javier
Previous Topic: Compilers: Microsoft vs GCC (or MinGW)
Next Topic: Problem with the debugger
Goto Forum:
  


Current Time: Thu Apr 25 08:42:35 CEST 2024

Total time taken to generate the page: 0.02826 seconds