Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Shortcutbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Shortcutbar

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


Joined: 23 February 2004
Location: France
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote amstel Quote  Post ReplyReply Direct Link To This Post Topic: Shortcutbar
    Posted: 10 March 2004 at 8:45am

How to add icons on shortcutbar ??

Thanks,
J-Marc Paris, France

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2004 at 9:16am
Take a look at the Shortcutbar sample in the Common folder.  The ShortcutBar will display two different sized images depending on how the shortcut is displayed.  If the shortcut is grouped individually it will use a 24x24 image. If the shortcut is  grouped together in on the bottom, then they will use a 16x16 image.  You will add 2 ImageList controls to the form.  Name one of them imlShortcutBarIcons and change the height and width to 16, Name the second ImageList imlShortcutBarIconsBig and change the height and width to 24.  You will need to right-click on each ImageList control, select properties, and click on the Images tab and add some images.  The index of the image will be used to associate each image with a shortcut in the ShortcutBar.  The AddItem method of the ShortcutBar control takes three parameters, the first is the Index of the image in the ImageLists.  The code below will illustrate how to add three shortcuts to the ShortcutBar and associate an image to them.

    Dim Item As ShortcutBarItem
    
    Set ItemMail = wndShortcutBar.AddItem(1, "Mail", 0)
    Set Item = wndShortcutBar.AddItem(4, "Tasks", 0)
    Set Item = wndShortcutBar.AddItem(5, "Notes", 0)
   
    wndShortcutBar.AddImageList imlShortcutBarIcons
    wndShortcutBar.AddImageList imlShortcutBarIconsBig

You will need to use the AddImageList method of the ShortcutBar control to add the 2 image lists added to the form.  When specifying two ImageLists, one list must contain 16x16 images, the other must contain 24x24 images.  The ShortcutBar control will automatically use the 16x16 ImageList for images in the shortcut menu grouping at the bottom of the control (red circle).  The ShortcutBar control will then use the 24x24 ImageList for the expanded menu shortcuts (yellow circle).  If only one ImageList is specified, those images will be used as both 16x16 and 24x24 images.  If two ImageLists are loaded and are not 16x16 and 24x24, only the smaller of the two ImageLists will be used for both sets of images.


Let me know if you need more helped. 


Edited by SuperMario
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 7:46am

I need to use my usercontrol imagelist but y have this error:

 'run-time error 438: property or metod not supported'

why?    

Thanks

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 7:50am
What is the code you are using?  You are using an ImageList you created yourself?
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 8:12am
Yes i using an ImageList usercontrol created myself, at working normaly with other control. Probably I have not implemented all the property.

Edited by cory
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 8:22am
I would suggest implementing all of the normal ImageList properties. 

Note:  In the next release, you will be able to use the ImageManager control to supply icons to the ShortcutBar.  Just something to keep in mind.

If implementing all the standard properties does not work, maybe post another sample for us to debug.
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2004 at 8:50am

Send my project source....

2004-09-17_084941_Progetto1.zip

tanks for all

 

Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2004 at 1:57am

Does anybody know how can i set up ShortcutBar Popup menu to use a different language?

Tanks

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2004 at 6:36am
To change language:

Just add this code to your application:

   SuiteControlsGlobalSettings.ResourceFile = App.Path & "XTPResourceDe.dll"

Change App.Path to the path of the resource Dll, located by default in the bin\translations directory.
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2004 at 10:41am

Hello Supermario, you have some news for my problem with my usercontrol imagelist?

Thanks in advance

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2004 at 11:17am
Not sure why it doesn't like your imagelist.

Maybe something like this:
    ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(1), 1, xtpImageNormal
    ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(2), 2, xtpImageNormal
Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2004 at 4:12am

sorry but I don't have the collection "icons" in my shortcutbar (my version is 9.10) and so i can't add icons...or was just what u think will be implemented in the next versions?

anyway, thank u

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2004 at 6:29am
Opps, I didn't realize that this wasn't in 9.10.  Just wait until 9.5 comes out shortly.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2004 at 8:11am
Have you tried the code I posted with the new release?  Any more problems?


    ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(1), 1, xtpImageNormal
    ShortcutBar1.Icons.AddIcon Me.XImgList1.ItemCopyOfIcon(2), 2, xtpImageNormal

Back to Top
cory View Drop Down
Groupie
Groupie


Joined: 31 August 2004
Location: Italy
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote cory Quote  Post ReplyReply Direct Link To This Post Posted: 21 October 2004 at 11:20am

Thanks too much,

Yes of course, I have installed the new release and everithing works fine!

thank u    Big smile

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.156 seconds.