![]() |
Custom icon groups on the Ribbon bar |
Post Reply ![]() |
Author | |
benniboi ![]() Newbie ![]() Joined: 20 July 2007 Location: Australia Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
benniboi ![]() Newbie ![]() Joined: 20 July 2007 Location: Australia Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
What I meant was how can I create my own group of icons and functions within the bar? Are there any instructions regarding this?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
benniboi ![]() Newbie ![]() Joined: 20 July 2007 Location: Australia Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
benniboi ![]() Newbie ![]() Joined: 20 July 2007 Location: Australia Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
benniboi ![]() Newbie ![]() Joined: 20 July 2007 Location: Australia Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg, are you able to get back to me on this? Thanks
|
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |