Problems with adding of a panel, icon for the program,etc...

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Problems with adding of a panel, icon for the program,etc...

Post by GianT »

Hi everybody, I encounter some problems with WxDev-C++. I use the graphical interface because it makes the programmation easier. But when after making a status bar, 2 tool bars with tool buttons and a menu bar, when I want to add a panel or a listCtrl or an Html page (etc), when I compile and run the program, the second tool bar is not at the right place. In fact it comes over the first tool bar.
Furthermore, in the options of the application, I put the option wxRESIZE_BORDER to false, and wxCAPTION also in order that none could modify the size of the window. But it is still possible...
Besides, when I choose an icon for my program, I get an error when I run it, saying that it can't load a bitmap from ressources and to check the .rc file...But I don't know how to use this ressource file.

I would like to know also how to make a tool bar or a menu bar just like the taskbar of windows, that's to say adding icons next to the menu items. In fact I would like this bar to have menus like the start menu of windows. I'm sorry to ask so much things, but I can't find any help for wxDev-c++ unless the wxdev-c++ minimal, but it is not enough.
Thanks for the answers.
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Re: Problems with adding of a panel, icon for the program,et

Post by NinjaNL »

GianT wrote:But when after making a status bar, 2 tool bars with tool buttons and a menu bar, when I want to add a panel or a listCtrl or an Html page (etc), when I compile and run the program, the second tool bar is not at the right place. In fact it comes over the first tool bar.
Congratulations, you just found a bug. Whether it is a bug in wxWidgets or wxDevCpp you would do well to report it to Guru here Outline the problem, and Guru or one of the other developers will try and find the problem.
GianT wrote:Furthermore, in the options of the application, I put the option wxRESIZE_BORDER to false, and wxCAPTION also in order that none could modify the size of the window. But it is still possible...
Try setting the minimize and maximize options to False,
GianT wrote:Besides, when I choose an icon for my program, I get an error when I run it, saying that it can't load a bitmap from ressources and to check the .rc file...But I don't know how to use this ressource file.

Could you outline how you are associating an icon?
GianT wrote:I would like to know also how to make a tool bar or a menu bar just like the taskbar of windows, that's to say adding icons next to the menu items. In fact I would like this bar to have menus like the start menu of windows.

In the menu editor, look for the button "Bitmaps" you can use this to select a bitmap for next to your menu items. Note however that the bitmaps are only appearing next to SUBitems, not in the top level menu item. In other words, the menu option "File" won't have a bitmap but the options beneath it (Save, Open, New, Print and whatever others you have created) would have a bitmap.
GianT wrote:I'm sorry to ask so much things,
Don't worry, it's what this forum in for.
GianT wrote:but I can't find any help for wxDev-c++ unless the wxdev-c++ minimal, but it is not enough.
Thanks for the answers.
Keep watching, there is another tutorial coming, and if you have any ideas for it, let me know.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT »

Woow, thx for this complete answer, you are very useful for the forum users :D
Well,
Try setting the minimize and maximize options to False
I had already tried it, it doesn't work. The only option true is wxSTAY_ON_TOP
Could you outline how you are associating an icon?
I click on the frame, then in the left panel, I click on Icon-Edit picture. Then I browse my folders and I load it after making sure that the program shows me a preview of the icon.

I will now take a look at what you told me for the taskbar.
Thx
Last edited by GianT on Wed Mar 16, 2005 8:15 pm, edited 1 time in total.
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT »

Note however that the bitmaps are only appearing next to SUBitems, not in the top level menu item. In other words, the menu option "File" won't have a bitmap but the options beneath it
Sorry, I didn't read this part. In fact that is exactly what I want, an icon next to the option "File" , just like the icon in the button start of windows.
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL »

GianT wrote:that is exactly what I want, an icon next to the option "File" , just like the icon in the button start of windows.
Unfortunately, I don't believe that that is standard windows behaviour. However, you could check this thread out for pixmap buttons (bitmap and text) and possibly add them to a third toolbar (once the problem with multiple toolbars is sorted out). Then on selecting, use a wxpopuptransient window upon which you have other pixmap buttons representing your menu?
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT »

I thought this also, but in fact I didn't manage to link the popup menu to the tool button... I missed asking for this too. I thought there would be something like popmenu-ShowModal() just like in the tutorial, but it did not work :D
I tried to take a look at the menu.h menuitem.h, but I couldn't produce anything with it.

--> Guru: I'd like to add this: Great work! Once upon a time I tried to begin winapi to make windows graphical applications, and I gave up because of other projects, but with wxdev-c++, it is now easily possible! Go Guru, go on :wink:
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

GianT wrote: I put the option wxRESIZE_BORDER to false, and wxCAPTION also in order that none could modify the size of the window. But it is still possible..
Try setting the wxTHICK_FRAME option as false. This should make the dialog not resizable.
NinjaNL wrote:
GianT wrote: the second tool bar is not at the right place. In fact it comes over the first tool bar.
Whether it is a bug in wxWidgets or wxDevCpp you would do well to report it
This is a confirmed problem with wxWidgets. When you add 2 toolbars in DialogBlocks you can easily see that. But there is a different problem with wx-devcpp as such. It is possible to add a toolbar to a panel or another sizer in wxWidgets but wx-devcpp doesnt support that. I have already modified the bug report with this message. It will be good idea to ask this in the wx-users mailinglist to get the insight about the problem.
GianT wrote: but I can't find any help for wxDev-c++ unless the wxdev-c++ minimal, but it is not enough.
I guess its time to start a new documentation project for wx-devcpp. Someone should come forward to write a small helpfile outlining the basic features of wx-devcpp. I'll try to start the project sometimes this month.
Apart from that, NinjaNL has already done a good tutorial on using creating a hello world program. I hope his future work on the tutorials also contains interesting stuff.
GianT wrote:I thought this also, but in fact I didn't manage to link the popup menu to the tool button... I missed asking for this too.
You need to code that by yourself. In the toolButton Click event, call the Popupmenu function with the PopupMenu Object and the position of the Toolbar. like

tbtnFile->PopupMenu(pmnuFiles,tbtnFile.GetPosition());
GianT wrote: with wxdev-c++, it is now easily possible! Go Guru, go on :wink:
I'm really happy that wx-devcpp is helpful to you. Just like you in 2001 when I tried wxWidgets I gave all the hopes in using it because of the lack of Designer like wx-devcpp. With my contribution to wx-devcpp, I'm happy that people wont make the mistake of ignoring wxWidgets like I did it.

-Guru Kathiresan
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT »

I don't know if you already knew it, but the bug that I made you aware of earlier doesn't concern only the adding of a panel. After putting my 2 toolbars just under the menu bar, when I try to add a single checkbox button in the...errrrr...I would say in the frame (the part between the tool bars and the status bar), the same problem happens again. If you don't remember, the problem is that the tool bar which is under the other comes over it: the result, we almost get 2 tool bars in one, but as you can imagine, there is then a problem with the buttons of the 2 toolbars....

And I still have a problem with associating an icon with the program... It does not take the icon I tell it to, it gives me a blank icon with a blue bar.
Post Reply