Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Custom icon groups on the Ribbon bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom icon groups on the Ribbon bar

 Post Reply Post Reply
Author
Message
benniboi View Drop Down
Newbie
Newbie


Joined: 20 July 2007
Location: Australia
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote benniboi Quote  Post ReplyReply Direct Link To This Post Topic: Custom icon groups on the Ribbon bar
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
benniboi View Drop Down
Newbie
Newbie


Joined: 20 July 2007
Location: Australia
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote benniboi Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
benniboi View Drop Down
Newbie
Newbie


Joined: 20 July 2007
Location: Australia
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote benniboi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
benniboi View Drop Down
Newbie
Newbie


Joined: 20 July 2007
Location: Australia
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote benniboi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
benniboi View Drop Down
Newbie
Newbie


Joined: 20 July 2007
Location: Australia
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote benniboi Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 11:30am
Hi Oleg, are you able to get back to me on this? Thanks
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.