Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Toolbar with different buttons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar with different buttons

 Post Reply Post Reply
Author
Message
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar with different buttons
    Posted: 17 February 2010 at 5:30am
Hi,

I'm testing the toolbar functionalities with Codejock. I don't succeed to do the following.


As you can see I have 3 types of buttons. I don't succeed to get them in one toolbar. It should be easy with a ribbonbar, but I need it at the left or right. A ribbonbar can only be top or bottom?

I tried the following:
Create a commandbar.
Add a toolbar with an iconsize of 32,32
Add a toolbar with an iconsize of 12,12

The result is that I have 2 toolbars, they are not on the same commandbar. They behave as two different toolbars.

Anyone who can point me in the right direction?

Best regards,
Chris.
ABO Service
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2010 at 2:01pm
Hi,
 
It can be done with just a commandbars Toolbar. See image, the buttons are checked so you can see the height & width
 
Set toolBarItems = CommandBars.Add("Gereedschap", xtpBarLeft)
        toolBarItems.Width = 75
        Set btn = AddButton(toolBarItems.Controls, xtpControlButton, 40, "      F1", False, "", xtpButtonIconAndCaption, "Gereedschap", False)
            btn.Width = 75              
            btn.Height = 75
            btn.SetIconSize 32, 32
            btn.Checked = True
 
        Set btn = AddButton(toolBarItems.Controls, xtpControlButton, 40, "      F2", False, "", xtpButtonIconAndCaption, "Gereedschap", False)
            btn.Width = 25              
            btn.Height = 16
            btn.SetIconSize 16, 16
            btn.Checked = True
 
and so on....
 
just keep the total width of the horizontal buttons equal to the width of the toolbar
   
 
 
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2010 at 9:53am
Hi,

Thanks, I will try this right away.

Regards,

ABO Service
Back to Top
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2010 at 11:14am
Hi,

I don't succeed.

...
        Set btn = AddButton(toolBarItems.Controls, xtpControlButton, 40, "      F1", False, "", xtpButtonIconAndCaption, "Gereedschap", False)
...

I can't find ADDButton, I only find the ADD method?


With the Width and Height, the buttons are changed, but they won't appear near each other, they all become under each other. They are on one toolbar, but I can't position them.

Any other thoughts? Starting a new group? Or something else?

Regards,
Chris.
ABO Service
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2010 at 12:26pm
Hello Skiman, The addbutton method is a function defined in many of the projects using the ribbon. Check your sample projects under Ribbon for this custom function.

Hope that helps friend ;]
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2010 at 2:06am
Hi,
 
I think you have to try something else... This isn't going to work like you would expect. If the toolbar is docked you get a different layout, I don't know why but the toolbar is resized differently and the buttons are aligned somehow. Undocked it looks just what you want but that is not enough, right? You have to find other solution to create such toolbar.
 
Good luck 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
skiman View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Location: Belgium
Status: Offline
Points: 88
Post Options Post Options   Thanks (0) Thanks(0)   Quote skiman Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2010 at 6:50am
Hi,
 
Yes, you are correct. When the toolbar is floating, it looks as I want. It looks as a bug to me. I can't imagine that this behaviour is normal.
 
Thanks for your remark. Now I know why it isn't working in my Xbase++ sample.
 
Regards,
Chris.
ABO Service
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.184 seconds.