Print Page | Close Window

Shortcutbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=511
Printed Date: 27 September 2024 at 6:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Shortcutbar
Posted By: amstel
Subject: Shortcutbar
Date Posted: 10 March 2004 at 8:45am

How to add icons on shortcutbar ??

Thanks,
J-Marc Paris, France




Replies:
Posted By: SuperMario
Date 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. 


Posted By: cory
Date 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



Posted By: SuperMario
Date Posted: 17 September 2004 at 7:50am
What is the code you are using?  You are using an ImageList you created yourself?


Posted By: cory
Date 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.


Posted By: SuperMario
Date 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.


Posted By: cory
Date Posted: 17 September 2004 at 8:50am

Send my project source....

https://forum.codejock.com/uploads/cory/2004-09-17_084941_Progetto1.zip - 2004-09-17_084941_Progetto1.zip

tanks for all

https://forum.codejock.com/uploads/cory/2004-09-17_084941_Progetto1.zip -  



Posted By: cory
Date Posted: 24 September 2004 at 1:57am

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

Tanks



Posted By: SuperMario
Date 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.


Posted By: cory
Date Posted: 28 September 2004 at 10:41am

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

Thanks in advance



Posted By: SuperMario
Date 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


Posted By: cory
Date 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



Posted By: SuperMario
Date 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.


Posted By: SuperMario
Date 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



Posted By: cory
Date 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




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