Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / BlueGui Icons

Author
Message
Slooper
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Sweden
Posted: 13th Oct 2006 00:13 Edited at: 13th Oct 2006 00:22
Is it possible to put ownmade icons on the same row as "file" "object" and "help" menu items? like shown in the pic below.

And if possible how do i do it?

[img][/img]

You never fail, only make mistakes.
Alquerian
19
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 13th Oct 2006 02:44 Edited at: 13th Oct 2006 02:47
Right, that would be nice wouldn't it. Telling the code to use the Menu bar as the toolbar's parent doesn't work it gives you a rebar construction error.

After trying that, I then tried to resize the menubar gadget which resulted in a rather unpleasant crash... 'this program has encountered an error and needs to close yadda yadda'

so... I then broke down and read the help file and aparently in the menubar you can optionally have an image. It looks like this is the solution you are looking for. I was able to make it work correctly by passing the object's insetBefore tag as the object's returnValue or index.

Since, my icon was to be placed 4th in the list (as is yours), I had to use an isertBefore of 4. If I had used an insetbefore of 0, it does some crazieness and puts the image behind the menu text, acting like a background. I think this is some sort of a bug, if you are not worrying too much about the insertBefore tag (used primarily for dynamic menuing) then you can accomplish the results I have in the screenshot by using the code I have in the code section of this post:



EDIT:
Using the insetBefore tag works just fine, so long as you are not trying to insert before the first menu item.

"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle

Attachments

Login to view attachments
Slooper
22
Years of Service
User Offline
Joined: 13th Feb 2003
Location: Sweden
Posted: 13th Oct 2006 18:10
well when i saw your image i was more sure what i wanted, how did you add your own icons on the toolbar?

You never fail, only make mistakes.
Alquerian
19
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 13th Oct 2006 19:59
Firstly, you must make your icons as 16x16 bitmap images. I think you can use larger Bitmaps, but if you do, whatever image is first on your menu is the size the rest of the menu icons will be (at least I believe this to be the case), in most cases this is 16x16.

You can add an icon to the menu by doing as I specified above, or if you want a toolbar (with icons), you can do this by using code similar to this:




Read up on Toolbars and Menus in the BlueGUI help, it should get you the desired results.

"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle

Login to post a reply

Server time is: 2025-05-17 16:52:37
Your offset time is: 2025-05-17 16:52:37