Print Page | Close Window

Custom icon groups on the Ribbon bar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=7644
Printed Date: 18 June 2025 at 5:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom icon groups on the Ribbon bar
Posted By: benniboi
Subject: Custom icon groups on the Ribbon bar
Date Posted: 22 July 2007 at 11:26pm
Hi, I'm looking to purchase Xtreme Commandbars however I wanted to find out whether it was suitable for me. I need to be able to customise the ribbon bar with my own options and have one group that based on the selection would open another group next to it with more options.
 
Is this at all possible? I have looked around on the forums but couldn't really find anything relating to this. Any info or examples would be greatly appreciated.
 
Cheers
Ben



Replies:
Posted By: Oleg
Date Posted: 23 July 2007 at 12:35am
Hi,
 
Yes, its possible,  You can create/remove this group dynamically:
RibbonBar.Groups.InsertGroup - to add, RibbonBar.Groups.RemoveGroup to remove.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: benniboi
Date Posted: 23 July 2007 at 2:57am
What I meant was how can I create my own group of icons and functions within the bar? Are there any instructions regarding this?


Posted By: Oleg
Date Posted: 23 July 2007 at 6:02am
Hello,
 
Please just copy code from our samples:
 
   Set GroupParagraph = TabWrite.Groups.AddGroup("&Paragraph", ID_GROUP_PARAGRAPH)
    GroupParagraph.ControlsGrouping = True
   
    GroupParagraph.Add xtpControlSplitButtonPopup, ID_INSERT_BULLET, "Bullet"
    GroupParagraph.Add xtpControlSplitButtonPopup, ID_INSERT_NUMBERING, "Numbering"
    GroupParagraph.Add xtpControlSplitButtonPopup, ID_INSERT_LIST, "List"


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: benniboi
Date Posted: 23 July 2007 at 6:27am
Hi Oleg, thanks for that. I can see that in the demo. My query however relates to adding my own custom buttons in.
 
So for example, how do i make the line below into my own button with it's own graphic icon and it's own function?
 
GroupParagraph.Add xtpControlSplitButtonPopup, ID_INSERT_BULLET, "Bullet"
 
If I click on the custom button, am I able to open ip a larger subgroup on the menu? This is what I am after. If this is possible then I will purchase the component asap.
 
Thanks


Posted By: Oleg
Date Posted: 23 July 2007 at 8:27am
Hello,
 
I still can't understand where problem for you. All buttons are custom. You manually catch Execute event and execute any functionality. You manually set icons for all buttons.
Try to look into sample and understand how it works.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: benniboi
Date Posted: 23 July 2007 at 7:50pm
Hi Oleg, I guess what I'm after is some documentation, or a step by step guide on inserting a new button with its own function. I am looking through the code and I've tried changing some of the buttons to my own custom ones, and the new bitmaps I'm referring to are not coming up. What are the specs for the icons for the buttons in terms of pixels? In how many places are they actually referenced? I can see only one.
 
Do you actually have any documentation outlining what functions do what? It's a bit time consuming going through all the code to figure out if I can use this product. Thanks


Posted By: benniboi
Date Posted: 25 July 2007 at 11:30am
Hi Oleg, are you able to get back to me on this? Thanks


Posted By: jcollier
Date Posted: 25 July 2007 at 11:50am
To get the icons to work, just add a CodeJock ImageManager to your form.  You can then add icons to it similar to the MS ImageList.  When you add the icon you want you give it a unique ID number.

When you add a button to the ribbonbar, you give it the same id number as the icon in the imagemanager and the icon will appear on that button (make sure that at the end of your procedure that creates the buttons you add a line similar to this: CommandBars.Icons = ImageManager.Icons)

To catch a click of a button, just use the Execute event of the commandbar on your form and do a Select Case Control.ID

Put the code or a call a procedure for each id that you have added to the ribbon bar.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net